From 1e2de3ce615e5cd2bd89d6bd601ed3709059318b Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Tue, 12 Aug 2025 17:42:59 +0100 Subject: [PATCH] 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 --- 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 7086a2a264a..46de915c238 100644 --- a/drivers/spi/nxp_fspi.c +++ b/drivers/spi/nxp_fspi.c @@ -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; -- 2.47.3