Commit 8dbdee8e authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Mauro Carvalho Chehab

media: usb: null check create_singlethread_workqueue

In sd_start return value of create_singlethread_workqueue needs null
check.
Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 68085f31
...@@ -378,6 +378,9 @@ static int sd_start(struct gspca_dev *gspca_dev) ...@@ -378,6 +378,9 @@ static int sd_start(struct gspca_dev *gspca_dev)
} }
/* Start the workqueue function to do the streaming */ /* Start the workqueue function to do the streaming */
dev->work_thread = create_singlethread_workqueue(MODULE_NAME); dev->work_thread = create_singlethread_workqueue(MODULE_NAME);
if (!dev->work_thread)
return -ENOMEM;
queue_work(dev->work_thread, &dev->work_struct); queue_work(dev->work_thread, &dev->work_struct);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment