From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org,
kernel-janitors@vger.kernel.org,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: rcar-csi2: Use common error handling code in rcsi2_parse_dt()
Date: Fri, 1 Mar 2024 15:15:13 +0200 [thread overview]
Message-ID: <20240301131513.GG30104@pendragon.ideasonboard.com> (raw)
In-Reply-To: <8b4203dc-bc0a-4c00-8862-e2d0ed6e346b@web.de>
On Fri, Mar 01, 2024 at 01:10:15PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 1 Mar 2024 13:02:18 +0100
>
> Add a label so that a bit of exception handling can be better reused
> in an if branch of this function implementation.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Just in case someone may be tempted to apply this:
NAK
Markus, don't bother replying to this e-mail, I will delete your reply
without reading it.
> ---
> drivers/media/platform/renesas/rcar-csi2.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
> index 582d5e35db0e..621c92c31965 100644
> --- a/drivers/media/platform/renesas/rcar-csi2.c
> +++ b/drivers/media/platform/renesas/rcar-csi2.c
> @@ -1388,12 +1388,13 @@ static int rcsi2_parse_dt(struct rcar_csi2 *priv)
> ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
> if (ret) {
> dev_err(priv->dev, "Could not parse v4l2 endpoint\n");
> - fwnode_handle_put(ep);
> - return -EINVAL;
> + ret = -EINVAL;
> + goto put_fwnode_ep;
> }
>
> ret = rcsi2_parse_v4l2(priv, &v4l2_ep);
> if (ret) {
> +put_fwnode_ep:
> fwnode_handle_put(ep);
> return ret;
> }
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2024-03-01 13:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 12:10 [PATCH] media: rcar-csi2: Use common error handling code in rcsi2_parse_dt() Markus Elfring
2024-03-01 13:05 ` Geert Uytterhoeven
2024-03-01 13:42 ` Dan Carpenter
2024-03-03 8:36 ` Markus Elfring
2024-03-04 10:48 ` Sakari Ailus
2024-03-04 11:16 ` Dan Carpenter
2024-03-16 9:46 ` Niklas Söderlund
2024-03-16 9:54 ` Dan Carpenter
2024-03-16 10:18 ` Niklas Söderlund
2024-03-16 12:21 ` Markus Elfring
2024-03-01 13:15 ` Laurent Pinchart [this message]
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=20240301131513.GG30104@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Markus.Elfring@web.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund@ragnatech.se \
/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