Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] usb: uvcvideo: remove unneeded goto
@ 2022-06-16 19:54 Michael Grzeschik
  2022-06-17  8:20 ` paul.elder
  2022-06-17 10:21 ` Laurent Pinchart
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Grzeschik @ 2022-06-16 19:54 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, kernel

The goto statement in uvc_v4l2_try_format can simply be replaced by an
direct return. There is no further user of the label, so remove it.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 drivers/media/usb/uvc/uvc_v4l2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 26cf0517e36195..957f44f44a9a14 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -254,7 +254,7 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,
 	ret = uvc_probe_video(stream, probe);
 	mutex_unlock(&stream->mutex);
 	if (ret < 0)
-		goto done;
+		return ret;
 
 	/* After the probe, update fmt with the values returned from
 	 * negotiation with the device. Some devices return invalid bFormatIndex
@@ -300,7 +300,6 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,
 	if (uvc_frame != NULL)
 		*uvc_frame = frame;
 
-done:
 	return ret;
 }
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-17 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-16 19:54 [PATCH] usb: uvcvideo: remove unneeded goto Michael Grzeschik
2022-06-17  8:20 ` paul.elder
2022-06-17 10:21 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox