lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 1 Mar 2024 15:15:13 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: linux-renesas-soc@...r.kernel.org, linux-media@...r.kernel.org,
	kernel-janitors@...r.kernel.org,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Niklas Söderlund <niklas.soderlund@...natech.se>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: rcar-csi2: Use common error handling code in
 rcsi2_parse_dt()

On Fri, Mar 01, 2024 at 01:10:15PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.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@...rs.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ