Commit 24c3aae0 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] uvcvideo: Handle uvc_init_video() failure in uvc_video_enable()

Turn streaming off (by selecting alternate setting 0) and disable the
video buffers queue in the uvc_video_enable() error path.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6998b6fb
......@@ -1283,6 +1283,11 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable)
return ret;
}
return uvc_init_video(stream, GFP_KERNEL);
}
ret = uvc_init_video(stream, GFP_KERNEL);
if (ret < 0) {
usb_set_interface(stream->dev->udev, stream->intfnum, 0);
uvc_queue_enable(&stream->queue, 0);
}
return ret;
}
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