Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Navid Emamdoost and committed by
Mauro Carvalho Chehab
68085f31 e6f45ea2

+3
+3
drivers/media/usb/gspca/sq905c.c
··· 276 276 } 277 277 /* Start the workqueue function to do the streaming */ 278 278 dev->work_thread = create_singlethread_workqueue(MODULE_NAME); 279 + if (!dev->work_thread) 280 + return -ENOMEM; 281 + 279 282 queue_work(dev->work_thread, &dev->work_struct); 280 283 281 284 return 0;