aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/gspca/m5602/m5602_s5k83a.c')
-rw-r--r--drivers/media/usb/gspca/m5602/m5602_s5k83a.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
index be5e25d1a2e8..6ad8d4849680 100644
--- a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
+++ b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
@@ -345,6 +345,11 @@ 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)) {
+ err = PTR_ERR(sd->rotation_thread);
+ sd->rotation_thread = NULL;
+ return err;
+ }
wake_up_process(sd->rotation_thread);
/* Preinit the sensor */