From: paul.elder@ideasonboard.com
To: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
kernel@pengutronix.de
Subject: Re: [PATCH] usb: uvcvideo: remove unneeded goto
Date: Fri, 17 Jun 2022 17:20:54 +0900 [thread overview]
Message-ID: <20220617082054.GA3309559@pyrite.rasen.tech> (raw)
In-Reply-To: <20220616195454.2983249-1-m.grzeschik@pengutronix.de>
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
>
next prev parent reply other threads:[~2022-06-17 8:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 19:54 [PATCH] usb: uvcvideo: remove unneeded goto Michael Grzeschik
2022-06-17 8:20 ` paul.elder [this message]
2022-06-17 10:21 ` Laurent Pinchart
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=20220617082054.GA3309559@pyrite.rasen.tech \
--to=paul.elder@ideasonboard.com \
--cc=kernel@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@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