spi: fspi: Logical or used instead of logical and

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@linaro.org>
This commit is contained in:
Andrew Goodbody
2025-08-12 17:42:59 +01:00
committed by Tom Rini
parent 9a6411daed
commit 1e2de3ce61

View File

@@ -882,9 +882,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;