diff options
| author | Andrew Goodbody <[email protected]> | 2025-10-06 16:09:25 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-28 10:33:00 -0600 |
| commit | f12ca3e2b81beef901c182981bb70b0b2aec8f6c (patch) | |
| tree | 50be4b104a0f7fc90cf2f5ec506a65933171735e /drivers/spi | |
| parent | 1e2de3ce615e5cd2bd89d6bd601ed3709059318b (diff) | |
spi: spi-uclass: Use unwind goto
In _spi_get_bus_and_cs the check for stacked parallel support needing
multiple chip select support does a direct return on error. Instead it
should set the error code in ret and then use the unwind goto.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
Diffstat (limited to 'drivers/spi')
| -rw-r--r-- | drivers/spi/spi-uclass.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index d6049753740..49b584c648d 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -449,7 +449,8 @@ int _spi_get_bus_and_cs(int busnum, int cs, int speed, int mode, #if CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL) if ((dev_read_bool(dev, "parallel-memories")) && !slave->multi_cs_cap) { dev_err(dev, "controller doesn't support multi CS\n"); - return -EINVAL; + ret = -EINVAL; + goto err; } #endif /* |
