Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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;
}