mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 02:20:40 +00:00
media: gspca: null check create_singlethread_workqueue
In sd_start the 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:
parent
e6f45ea2e7
commit
68085f314d
1 changed files with 3 additions and 0 deletions
|
@ -276,6 +276,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;
|
||||||
|
|
Loading…
Reference in a new issue