Merge patch series "spi: cadence_qspi: Fix Smatch reported issues"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported issues with an off by 1 error in a test for a timeout
and also an error exit that did not set an error code.

Link: https://lore.kernel.org/r/20250812-cadence_qspi-v1-0-0d693d810145@linaro.org
This commit is contained in:
Tom Rini
2025-10-28 10:33:00 -06:00
2 changed files with 3 additions and 3 deletions
+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 */
+2 -2
View File
@@ -354,7 +354,7 @@ void cadence_qspi_apb_controller_init(struct cadence_spi_priv *priv)
int cadence_qspi_apb_exec_flash_cmd(void *reg_base, unsigned int reg)
{
unsigned int retry = CQSPI_REG_RETRY;
int retry = CQSPI_REG_RETRY;
/* Write the CMDCTRL without start execution. */
writel(reg, reg_base + CQSPI_REG_CMDCTRL);
@@ -369,7 +369,7 @@ int cadence_qspi_apb_exec_flash_cmd(void *reg_base, unsigned int reg)
udelay(1);
}
if (!retry) {
if (retry == -1) {
printf("QSPI: flash command execution timeout\n");
return -EIO;
}