In regulator_list_autoset there is a test for ret being non-zero and
error being zero but it uses the binary '&' instead of the logical '&&'
which could well lead to unexpected results. Correct this to use the
logical '&&' instead.
This issue found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
ret = regulator_autoset_by_name(list_platname[i], &dev);
if (ret != -EMEDIUMTYPE && verbose)
regulator_show(dev, ret);
- if (ret & !error)
+ if (ret && ret != -EALREADY && !error)
error = ret;
if (list_devp)