mirror of https://gitee.com/openkylin/linux.git
[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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
6998b6fb4b
commit
24c3aae0c7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue