Skip to contentSkip to conversation

m5602: correctly check failed thread creation

PATCH New Insu Yun 1 participant 1 message Nov 17, 2015

Subsystems (3)
lore
Share & tools
lore

Insu Yun

author
#0 lore raw

PATCH 1/1 m5602: correctly check failed thread creation

---
 drivers/media/usb/gspca/m5602/m5602_s5k83a.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c +3 -0
index bf6b215..84b2961 100644
@@ -221,6 +221,9 @@ int s5k83a_start(struct sd *sd)
 	   to assume that there is no better way of accomplishing this */
 	sd->rotation_thread = kthread_create(rotation_thread_function,
 					     sd, "rotation thread");
+	if (IS_ERR(sd->rotation_thread))
+		return PTR_ERR(sd->rotation_thread);
+
 	wake_up_process(sd->rotation_thread);
 
 	/* Preinit the sensor */
Signature · 1 line
1.9.1