Skip to content

Commit

Permalink
V4L/DVB (10199): uvcvideo: Fix GET_DEF failure detection.
Browse files Browse the repository at this point in the history
Commit 44f0079 erroneously considers all
GET_DEF requests as unsuccessful. Fix this by checking the request return
value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Jan 29, 2009
1 parent fba4578 commit 51cac8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/uvc/uvc_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 51cac8a

Please sign in to comment.