If we fail to query the ctrl error there is no information on dmesg or
in uvc_dbg, which makes it difficult to debug
Reorder the log position to fix this.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index a57272a2c9e1..bdc3f545a15e 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -83,11 +83,11 @@ static int uvc_query_ctrl_error(struct uvc_device *dev, u8 intfnum, void *data)
error = *(u8 *)data;
*(u8 *)data = tmp;
+ uvc_dbg(dev, CONTROL, "Control error %u, ret %d\n", error, ret);
+
if (ret != 1)
return ret < 0 ? ret : -EPIPE;
- uvc_dbg(dev, CONTROL, "Control error %u\n", error);
-
switch (error) {
case 0:
/* Cannot happen - we received a STALL */
--
2.47.0.rc0.187.ge670bccf7e-goog