mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
media: uvcvideo: Improve error logging in uvc_query_ctrl()
Standard use of the driver may result in error messages on the kernel log. This can hide other more important messages, and alert unnecessarily the user. Let's keep dev_err() for the important occasions. If __uvc_query_ctrl() failed with a non -EPIPE error, then report that with dev_err. If an error code is obtained, then report that with dev_dbg. Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
9f582f0418
commit
67a655be57
1 changed files with 6 additions and 5 deletions
|
@ -79,13 +79,14 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,
|
|||
if (likely(ret == size))
|
||||
return 0;
|
||||
|
||||
dev_err(&dev->udev->dev,
|
||||
"Failed to query (%s) UVC control %u on unit %u: %d (exp. %u).\n",
|
||||
uvc_query_name(query), cs, unit, ret, size);
|
||||
|
||||
if (ret != -EPIPE)
|
||||
if (ret != -EPIPE) {
|
||||
dev_err(&dev->udev->dev,
|
||||
"Failed to query (%s) UVC control %u on unit %u: %d (exp. %u).\n",
|
||||
uvc_query_name(query), cs, unit, ret, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Reuse data[0] to request the error code. */
|
||||
tmp = *(u8 *)data;
|
||||
|
||||
ret = __uvc_query_ctrl(dev, UVC_GET_CUR, 0, intfnum,
|
||||
|
|
Loading…
Reference in a new issue