提交 24c3aae0 编写于 作者: L Laurent Pinchart 提交者: 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: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册