Skip to content

Commit

Permalink
[media] uvcvideo: Disable the queue when failing to start
Browse files Browse the repository at this point in the history
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: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sjoerd Simons authored and Mauro Carvalho Chehab committed Jul 1, 2011
1 parent 8ca2c80 commit aa122d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/video/uvc/uvc_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit aa122d4

Please sign in to comment.