]> git.baikalelectronics.ru Git - kernel.git/commit
spi: microchip-core: fix potentially incorrect return from probe
authorConor Dooley <conor.dooley@microchip.com>
Tue, 14 Jun 2022 06:58:10 +0000 (07:58 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 14 Jun 2022 08:26:41 +0000 (09:26 +0100)
commit8ad04719ead35433deaaebfb8270e354893736c7
treec3048a57f8ab05a5c9df0769fd034fdd26670002
parent2a7df93083dbc8a29998f170343448cadded33ad
spi: microchip-core: fix potentially incorrect return from probe

If platform_get_irqi() returns 0, the error case will be triggered but
probe() will return 0 rather than an error. Ape the other drivers using
this pattern and return -ENXIO.

Reported-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/linux-spi/20220609055533.95866-2-yang.lee@linux.alibaba.com/
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Fixes: 3e5898b20052 ("spi: add support for microchip fpga spi controllers")
Link: https://lore.kernel.org/r/20220614065809.1969177-1-conor.dooley@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-microchip-core.c