[PATCH] spi: microchip-core: fix passing zero to PTR_ERR warning
Mark Brown
broonie at kernel.org
Wed Jun 15 04:40:28 PDT 2022
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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20220615/ad7344f5/attachment.sig>
More information about the linux-riscv
mailing list