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

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>

authored by

Navid Emamdoost and committed by
Mauro Carvalho Chehab
8dbdee8e 68085f31

+3
+3
drivers/media/usb/gspca/sq905.c
··· 378 378 } 379 379 /* Start the workqueue function to do the streaming */ 380 380 dev->work_thread = create_singlethread_workqueue(MODULE_NAME); 381 + if (!dev->work_thread) 382 + return -ENOMEM; 383 + 381 384 queue_work(dev->work_thread, &dev->work_struct); 382 385 383 386 return 0;