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] [day] [month] [year] [list]
Message-ID: <20220213162859.3d968256@jic23-huawei>
Date:   Sun, 13 Feb 2022 16:28:59 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Julia Lawall <julia.lawall@...ia.fr>,
        Lars-Peter Clausen <lars@...afoo.de>
Cc:     Anand Ashok Dumbre <anand.ashok.dumbre@...inx.com>,
        kbuild-all@...ts.01.org, linux-arm-kernel@...ts.infradead.org,
        Michal Simek <monstr@...str.eu>,
        Dragan Cvetic <dragan.cvetic@...inx.com>, git@...inx.com,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings

On Sat, 12 Feb 2022 23:39:33 +0100 (CET)
Julia Lawall <julia.lawall@...ia.fr> wrote:

> From: kernel test robot <lkp@...el.com>
> 
> For_each_child_of_node" should have of_node_put() before return.
> 
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
> 
> CC: Anand Ashok Dumbre <anand.ashok.dumbre@...inx.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
> 
> ---
> 
> tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
> head:   966124532656bc95d781abf57531e4cd4f962237
> commit: 1459646ab280aa68c3c4fa1d9552ea21f15d7a2d [543/923] iio: versal-sysmon: add driver for Versal Sysmon
> :::::: branch date: 3 days ago
> :::::: commit date: 12 days ago
> 
> Please take the patch only if it's a positive warning. Thanks!

Patch is obviously correct, but this driver isn't upstream so from point of view
of the IIO tree I'm ignoring this.

Thanks,

Jonathan

> 
>  versal-sysmon.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> --- a/drivers/iio/adc/versal-sysmon.c
> +++ b/drivers/iio/adc/versal-sysmon.c
> @@ -875,12 +875,16 @@ static int sysmon_parse_dt(struct iio_de
> 
>  	for_each_child_of_node(np, child_node) {
>  		ret = of_property_read_u32(child_node, "reg", &reg);
> -		if (ret < 0)
> +		if (ret < 0) {
> +			of_node_put(child_node);
>  			return ret;
> +		}
> 
>  		ret = of_property_read_string(child_node, "xlnx,name", &name);
> -		if (ret < 0)
> +		if (ret < 0) {
> +			of_node_put(child_node);
>  			return ret;
> +		}
> 
>  		sysmon_channels[i].type = IIO_VOLTAGE;
>  		sysmon_channels[i].indexed = 1;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ