Skip to content

Commit

Permalink
media: usb: null check create_singlethread_workqueue
Browse files Browse the repository at this point in the history
In sd_start return value of create_singlethread_workqueue needs null
check.

Signed-off-by: Navid Emamdoost <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Navidem authored and mchehab committed Oct 10, 2019
1 parent 68085f3 commit 8dbdee8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/usb/gspca/sq905.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8dbdee8

Please sign in to comment.