[PATCH] spi: fspi: Logical or used instead of logical and
Andrew Goodbody
andrew.goodbody at linaro.org
Tue Aug 12 18:42:59 CEST 2025
In erratum_err050568 the test for apllicability uses logical or to check
multiple chip IDs but this means the test will always evaluate to true
as at least 1 term will always be true. Logical and should have been
used so that the expression evaluates to true if all terms are true
which would mean that no chip ID of interest was in use.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
drivers/spi/nxp_fspi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index 6d97b8eefc9..853d666b019 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -846,9 +846,9 @@ static void erratum_err050568(struct nxp_fspi *f)
/* Check for LS1028A variants */
svr = SVR_SOC_VER(get_svr());
- if (svr != SVR_LS1017A ||
- svr != SVR_LS1018A ||
- svr != SVR_LS1027A ||
+ if (svr != SVR_LS1017A &&
+ svr != SVR_LS1018A &&
+ svr != SVR_LS1027A &&
svr != SVR_LS1028A) {
dev_dbg(f->dev, "Errata applicable only for LS1028A variants\n");
return;
---
base-commit: 7807ed921314cd7af83fd88162d0b8c6fb20a9ca
change-id: 20250812-nxp_fspi-5a30a147596d
Best regards,
--
Andrew Goodbody <andrew.goodbody at linaro.org>
More information about the U-Boot
mailing list