mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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 <andrew.goodbody@linaro.org>
This commit is contained in:
committed by
Tom Rini
parent
1e2de3ce61
commit
f12ca3e2b8
@@ -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
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user