2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00

media: usb: null check create_singlethread_workqueue

In sd_start return value of create_singlethread_workqueue needs null
check.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Navid Emamdoost 2019-09-11 17:26:00 -03:00 committed by Mauro Carvalho Chehab
parent 68085f314d
commit 8dbdee8e8a

View File

@ -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;