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>
/* 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;