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, 4 Jun 2021 09:35:49 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     Jonathan Cameron <jic23@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <linux-iio@...r.kernel.org>,
        <lars@...afoo.de>, <Michael.Hennerich@...log.com>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH -next] iio: frequency: adf4350: disable reg and clk on
 error in adf4350_probe()


On 2021/6/4 0:18, Jonathan Cameron wrote:
> On Tue, 1 Jun 2021 22:26:05 +0800
> Yang Yingliang <yangyingliang@...wei.com> wrote:
>
>> Disable reg and clk when devm_gpiod_get_optional() fails in adf4350_probe().
> Hi.
>
> One small thing. It would be useful if you could check if the bug exists other
> than in next (this one has been their for some time!)  If it does, please
> don't add the -next in the patch title (as basically it makes me not worry
> about reading it for a few days :)
>
> Also, make sure to cc the author of the patch in the fixes tag
> +CC Linus
OK

Thanks,
Yang
>
> Obvious enough fix (I hope) that I've applied it to the fixes-togreg branch of
> iio.git and marked for stable.
>
> Thanks,
>
> Jonathan
>
>> Fixes:4a89d2f47ccd ("iio: adf4350: Convert to use GPIO descriptor")
>> Reported-by: Hulk Robot <hulkci@...wei.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
>> ---
>>   drivers/iio/frequency/adf4350.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
>> index 1462a6a5bc6d..3d9eba716b69 100644
>> --- a/drivers/iio/frequency/adf4350.c
>> +++ b/drivers/iio/frequency/adf4350.c
>> @@ -563,8 +563,10 @@ static int adf4350_probe(struct spi_device *spi)
>>   
>>   	st->lock_detect_gpiod = devm_gpiod_get_optional(&spi->dev, NULL,
>>   							GPIOD_IN);
>> -	if (IS_ERR(st->lock_detect_gpiod))
>> -		return PTR_ERR(st->lock_detect_gpiod);
>> +	if (IS_ERR(st->lock_detect_gpiod)) {
>> +		ret = PTR_ERR(st->lock_detect_gpiod);
>> +		goto error_disable_reg;
>> +	}
>>   
>>   	if (pdata->power_up_frequency) {
>>   		ret = adf4350_set_freq(st, pdata->power_up_frequency);
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ