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: <20211028170400.1d922d5c@jic23-huawei>
Date:   Thu, 28 Oct 2021 17:04:00 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Wan Jiabing <wanjiabing@...o.com>
Cc:     Lars-Peter Clausen <lars@...afoo.de>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Fabrice Gasnier <fabrice.gasnier@...s.st.com>,
        Olivier Moysan <olivier.moysan@...s.st.com>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Ahmad Fatoum <a.fatoum@...gutronix.de>,
        Xu Wang <vulab@...as.ac.cn>, linux-iio@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        jiabing.wan@...com
Subject: Re: [PATCH v3] iio: adc: stm32-adc: Fix of_node_put() issue in
 stm32-adc

On Thu, 28 Oct 2021 23:42:02 +0800
Wan Jiabing <wanjiabing@...o.com> wrote:

> Fix following coccicheck warning:
> ./drivers/iio/adc/stm32-adc.c:2014:1-33: WARNING: Function
> for_each_available_child_of_node should have of_node_put() before return.
> 
> Early exits from for_each_available_child_of_node should decrement the
> node reference counter. Replace return by goto here.
> 
> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@...s.st.com>
> Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
I applied v2.  So no need to resend.  I fix minor typos etc whilst
applying patches as it saves everyone time!

Thanks,

Jonathan

> ---
> Changelog:
> v2:
> - Fix typo and add reviewed-by.
> v3:
> - Fix typo.
> ---
>  drivers/iio/adc/stm32-adc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> index 6245434f8377..7f1fb36c747c 100644
> --- a/drivers/iio/adc/stm32-adc.c
> +++ b/drivers/iio/adc/stm32-adc.c
> @@ -2024,7 +2024,8 @@ static int stm32_adc_generic_chan_init(struct iio_dev *indio_dev,
>  			if (strlen(name) >= STM32_ADC_CH_SZ) {
>  				dev_err(&indio_dev->dev, "Label %s exceeds %d characters\n",
>  					name, STM32_ADC_CH_SZ);
> -				return -EINVAL;
> +				ret = -EINVAL;
> +				goto err;
>  			}
>  			strncpy(adc->chan_name[val], name, STM32_ADC_CH_SZ);
>  			ret = stm32_adc_populate_int_ch(indio_dev, name, val);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ