* [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
* Re: [PATCH] usb: uvcvideo: remove unneeded goto
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
1 sibling, 0 replies; 3+ messages in thread
From: paul.elder @ 2022-06-17 8:20 UTC (permalink / raw)
To: Michael Grzeschik; +Cc: linux-media, laurent.pinchart, kernel
Hi Michael,
On Thu, Jun 16, 2022 at 09:54:54PM +0200, Michael Grzeschik wrote:
> 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>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
> ---
> 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 [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: uvcvideo: remove unneeded goto
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
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2022-06-17 10:21 UTC (permalink / raw)
To: Michael Grzeschik; +Cc: linux-media, kernel
Hi Michael,
Thank you for the patch.
On Thu, Jun 16, 2022 at 09:54:54PM +0200, Michael Grzeschik wrote:
> 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>
With s/usb: /media: / in the subject line,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I'll fix this when applying.
> ---
> 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;
> }
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [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;
as well as URLs for NNTP newsgroup(s).