Commit aa122d42 authored by Sjoerd Simons's avatar Sjoerd Simons Committed by Mauro Carvalho Chehab

[media] uvcvideo: Disable the queue when failing to start

When failing to start the camera we should disable the queue again, to
rollback into the same initial state. Otherwise re-trying will always
hit -EBUSY
Signed-off-by: default avatarSjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8ca2c80b
......@@ -1255,8 +1255,10 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable)
/* Commit the streaming parameters. */
ret = uvc_commit_video(stream, &stream->ctrl);
if (ret < 0)
if (ret < 0) {
uvc_queue_enable(&stream->queue, 0);
return ret;
}
return uvc_init_video(stream, GFP_KERNEL);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment