Commit 8dbdee8e authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Mauro Carvalho Chehab
Browse files

media: usb: null check create_singlethread_workqueue



In sd_start return value of create_singlethread_workqueue needs null
check.

Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 68085f31
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;