media: usb: null check create_singlethread_workqueue
Subsystems (2)
PATCH 1/1 media: usb: null check create_singlethread_workqueue
In sd_start return value of create_singlethread_workqueue needs null check.
Signed-off-by Navid Emamdoost <[email protected]>
--- drivers/media/usb/gspca/sq905.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/media/usb/gspca/sq905.c +3 -0
@@ -378,6 +378,9 @@ static int sd_start(struct gspca_dev *gspca_dev) }/* Start the workqueue function to do the streaming */ dev->work_thread =create_singlethread_workqueue (MODULE_NAME ); +if (!dev->work_thread) +return -ENOMEM ; +queue_work (dev->work_thread, &dev->work_struct);return 0 ;
Signature · 1 line
2.17.1