Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: fix return code when spi device has too many chipselects

Don't return a positive value when there are too many chipselects.

Fixes: 4d8ff6b0991d ("spi: Add multi-cs memories support in SPI core")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Link: https://patch.msgid.link/20250915183725.219473-2-jonas.gorski@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jonas Gorski and committed by
Mark Brown
188f6323 40987a08

+1 -1
+1 -1
drivers/spi/spi.c
··· 2445 2445 if (rc > ctlr->num_chipselect) { 2446 2446 dev_err(&ctlr->dev, "%pOF has number of CS > ctlr->num_chipselect (%d)\n", 2447 2447 nc, rc); 2448 - return rc; 2448 + return -EINVAL; 2449 2449 } 2450 2450 if ((of_property_present(nc, "parallel-memories")) && 2451 2451 (!(ctlr->flags & SPI_CONTROLLER_MULTI_CS))) {