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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <42d8b0ac-edb4-41be-9b7e-87626889e33b@gmx.de>
Date: Wed, 25 Sep 2024 21:35:37 +0200
From: Helge Deller <deller@....de>
To: Markus Elfring <Markus.Elfring@....de>, linux-omap@...r.kernel.org,
 linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
 Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
 Dave Airlie <airlied@...il.com>, Rob Clark <robdclark@...il.com>,
 Tomi Valkeinen <tomi.valkeinen@...com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: Re: [PATCH] fbdev: omapfb: Call of_node_put(ep) only once in
 omapdss_of_find_source_for_first_ep()

On 9/25/24 21:21, Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Wed, 25 Sep 2024 21:12:36 +0200
>
> An of_node_put(ep) call was immediately used after a pointer check
> for a of_graph_get_remote_port() call in this function implementation.
> Thus call such a function only once instead directly before the check.
>
> This issue was transformed by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>

applied.

Thanks!
Helge

> ---
>   drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
> index 4040e247e026..d5a43b3bf45e 100644
> --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
> +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
> @@ -129,12 +129,9 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
>   		return ERR_PTR(-EINVAL);
>
>   	src_port = of_graph_get_remote_port(ep);
> -	if (!src_port) {
> -		of_node_put(ep);
> -		return ERR_PTR(-EINVAL);
> -	}
> -
>   	of_node_put(ep);
> +	if (!src_port)
> +		return ERR_PTR(-EINVAL);
>
>   	src = omap_dss_find_output_by_port_node(src_port);
>
> --
> 2.46.1
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ