From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org,
"Biju Das" <biju.das.jz@bp.renesas.com>,
"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: rzg2l-csi2: Use common error handling code in rzg2l_csi2_parse_dt()
Date: Fri, 1 Mar 2024 15:14:55 +0200 [thread overview]
Message-ID: <20240301131455.GF30104@pendragon.ideasonboard.com> (raw)
In-Reply-To: <c26c73d8-9b20-431e-a299-c9508ac3f6ed@web.de>
On Fri, Mar 01, 2024 at 02:10:41PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 1 Mar 2024 14:02:22 +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/rzg2l-cru/rzg2l-csi2.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> index e68fcdaea207..ef6922dad35f 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> @@ -671,12 +671,13 @@ static int rzg2l_csi2_parse_dt(struct rzg2l_csi2 *csi2)
> ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
> if (ret) {
> dev_err(csi2->dev, "Could not parse v4l2 endpoint\n");
> - fwnode_handle_put(ep);
> - return -EINVAL;
> + ret = -EINVAL;
> + goto put_fwnode_ep;
> }
>
> ret = rzg2l_csi2_parse_v4l2(csi2, &v4l2_ep);
> if (ret) {
> +put_fwnode_ep:
> fwnode_handle_put(ep);
> return ret;
> }
> --
> 2.44.0
>
>
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2024-03-01 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 13:10 [PATCH] media: rzg2l-csi2: Use common error handling code in rzg2l_csi2_parse_dt() Markus Elfring
2024-03-01 13:14 ` 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=20240301131455.GF30104@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Markus.Elfring@web.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=sakari.ailus@linux.intel.com \
--cc=u.kleine-koenig@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