summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@skynet.be>2009-01-04 00:08:26 +0100
committerLaurent Pinchart <laurent.pinchart@skynet.be>2009-01-04 00:08:26 +0100
commit8f78573e85e8cf9f8acfbf76eeb04cc336bfa5c9 (patch)
treec511a569bcaea5e4cb382bc2ff84e9628c3f2eb9
parent4eda2f3f3ec8f7c8015e62e36fb7a03607284756 (diff)
downloadmediapointer-dvb-s2-8f78573e85e8cf9f8acfbf76eeb04cc336bfa5c9.tar.gz
mediapointer-dvb-s2-8f78573e85e8cf9f8acfbf76eeb04cc336bfa5c9.tar.bz2
uvcvideo: Fix GET_DEF failure detection.
From: Laurent Pinchart <laurent.pinchart@skynet.be> Commit 44f0079ec74330b457d990072c13cbe28b0f1abf erroneously considers all GET_DEF requests as unsuccessful. Fix this by checking the request return value. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
-rw-r--r--linux/drivers/media/video/uvc/uvc_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_video.c b/linux/drivers/media/video/uvc/uvc_video.c
index ce5572403..5fc1ff248 100644
--- a/linux/drivers/media/video/uvc/uvc_video.c
+++ b/linux/drivers/media/video/uvc/uvc_video.c
@@ -115,7 +115,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.