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 <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2025-10-28 10:27:40 -06:00
committed by Tom Rini
parent 0ed45794ae
commit 1a5129d3da
+1 -1
View File
@@ -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 */