aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/uvc/uvc_video.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c
index 5b757f32d997..f960e8ea4f17 100644
--- a/drivers/media/video/uvc/uvc_video.c
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -124,13 +124,14 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
124 int ret; 124 int ret;
125 125
126 size = stream->dev->uvc_version >= 0x0110 ? 34 : 26; 126 size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
127 if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
128 query == UVC_GET_DEF)
129 return -EIO;
130
127 data = kmalloc(size, GFP_KERNEL); 131 data = kmalloc(size, GFP_KERNEL);
128 if (data == NULL) 132 if (data == NULL)
129 return -ENOMEM; 133 return -ENOMEM;
130 134
131 if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) && query == UVC_GET_DEF)
132 return -EIO;
133
134 ret = __uvc_query_ctrl(stream->dev, query, 0, stream->intfnum, 135 ret = __uvc_query_ctrl(stream->dev, query, 0, stream->intfnum,
135 probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data, 136 probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
136 size, UVC_CTRL_STREAMING_TIMEOUT); 137 size, UVC_CTRL_STREAMING_TIMEOUT);