diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-12 12:34:39 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-28 10:27:40 -0600 |
| commit | 1a5129d3dafda90914972ce78db20f7eb6bc9fde (patch) | |
| tree | 6e02b1a12d96c48dc26cc1829e1b1c91b4579e68 | |
| parent | 0ed45794ae9fa3bd8adb1f2d85875f93d94249f8 (diff) | |
spi: cadence_qspi: Do not return unset error code
In spi_calibration if the low range fails to calibrate then the code
attempted to return the variable err but this has not been set in this
case. Instead just return -EIO.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
| -rw-r--r-- | drivers/spi/cadence_qspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index 9edbfaa821b..d8d9a4056fe 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -142,7 +142,7 @@ static int spi_calibration(struct udevice *bus, uint hz) if (range_lo == -1) { puts("SF: Calibration failed (low range)\n"); - return err; + return -EIO; } /* Disable QSPI for subsequent initialization */ |
