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]
Message-ID: <7eda95bd-c7f5-767a-fe88-9f7109467cd8@microchip.com>
Date:   Wed, 15 Jun 2022 11:57:37 +0000
From:   <Conor.Dooley@...rochip.com>
To:     <broonie@...nel.org>
CC:     <Daire.McNamara@...rochip.com>, <Lewis.Hanly@...rochip.com>,
        <linux-riscv@...ts.infradead.org>, <linux-spi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <dan.carpenter@...cle.com>
Subject: Re: [PATCH] spi: microchip-core: fix passing zero to PTR_ERR warning

On 15/06/2022 12:40, Mark Brown wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Wed, Jun 15, 2022 at 12:30:22PM +0100, Conor Dooley wrote:
> 
>> -             ret = PTR_ERR(spi->clk);
>> +             ret = !spi->clk ? -ENXIO : PTR_ERR(spi->clk);
> 
> I think you're looking for PTR_ERR_OR_ZERO() here?

Maybe I don't understand, so let me explain what I think you're
suggesting & maybe you can correct me:
> -             ret = PTR_ERR(spi->clk);
> +             ret = PTR_ERR_OR_ZERO(spi->clk);

But if spi->clk is NULL, this will return 0 from the probe
rather than returning an error?
If that's not what you meant, lmk
Thanks,
Conor.

> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ