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

Commit 51cac8ad authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10199): uvcvideo: Fix GET_DEF failure detection.



Commit 44f0079e erroneously considers all
GET_DEF requests as unsuccessful. Fix this by checking the request return
value.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent fba4578e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ static int uvc_get_video_ctrl(struct uvc_video_device *video,
		ctrl->wCompQuality = le16_to_cpup((__le16 *)data);
		ret = 0;
		goto out;
	} else if (query == GET_DEF && probe == 1) {
	} else if (query == GET_DEF && probe == 1 && ret != size) {
		/* Many cameras don't support the GET_DEF request on their
		 * video probe control. Warn once and return, the caller will
		 * fall back to GET_CUR.