mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xu Yang <xu.yang_2@nxp.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: jun.li@nxp.com, imx@lists.linux.dev, linux-usb@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Xu Yang <xu.yang_2@nxp.com>
Subject: [PATCH v2 3/4] usb: gadget: uvc: return error from uvcg_queue_init()
Date: Tue, 13 Jan 2026 17:53:09 +0800	[thread overview]
Message-ID: <20260113-uvc-gadget-fix-patch-v2-3-62950ef5bcb5@nxp.com> (raw)
In-Reply-To: <20260113-uvc-gadget-fix-patch-v2-0-62950ef5bcb5@nxp.com>

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>

---
Changes in v2:
 - improve commit message
---
 drivers/usb/gadget/function/uvc_video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index 9dc3af16e2f38957198bf579987f4324fc552c5d..f568dee08b3b7273be124a673682c02d20f7c77b 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;
 }

-- 
2.34.1


  parent reply	other threads:[~2026-01-13  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13  9:53 [PATCH v2 0/4] Some fix patches for uvc gadget function Xu Yang
2026-01-13  9:53 ` [PATCH v2 1/4] usb: gadget: uvc: fix req_payload_size calculation Xu Yang
2026-01-13  9:53 ` [PATCH v2 2/4] usb: gadget: uvc: fix interval_duration calculation Xu Yang
2026-01-13  9:53 ` Xu Yang [this message]
2026-01-13  9:53 ` [PATCH v2 4/4] usb: gadget: uvc: retry vb2_reqbufs() with vb_vmalloc_memops if use_sg fail Xu Yang
2026-01-13 15:44   ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260113-uvc-gadget-fix-patch-v2-3-62950ef5bcb5@nxp.com \
    --to=xu.yang_2@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®