summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXu Yang <xu.yang_2@nxp.com>2026-01-13 12:53:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-14 18:03:18 +0300
commit0bce8f19bba16277257a915e4fb94e1cfe99d760 (patch)
tree105be222c9e3d144f9262873bdaf64419ecdde6c
parent010dc57cb5163e5f4a32430dd5091cc29efd0471 (diff)
downloadlinux-0bce8f19bba16277257a915e4fb94e1cfe99d760.tar.xz
usb: gadget: uvc: return error from uvcg_queue_init()
uvcg_queue_init() may fail, but its return value is currently ignored. Propagate the error code from uvcg_queue_init() to correctly report initialization failures. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Link: https://patch.msgid.link/20260113-uvc-gadget-fix-patch-v2-3-62950ef5bcb5@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/gadget/function/uvc_video.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index 9dc3af16e2f3..f568dee08b3b 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -838,7 +838,6 @@ int uvcg_video_init(struct uvc_video *video, struct uvc_device *uvc)
video->interval = 666666;
/* Initialize the video buffers queue. */
- uvcg_queue_init(&video->queue, uvc->v4l2_dev.dev->parent,
+ return uvcg_queue_init(&video->queue, uvc->v4l2_dev.dev->parent,
V4L2_BUF_TYPE_VIDEO_OUTPUT, &video->mutex);
- return 0;
}