On Wed, Jan 31, 2024 at 10:09:41AM +0300, Dan Carpenter wrote:

> This condition has a bitwise & vs logical && typo so it only preserves
> odd number error codes.
> 
> Fixes: 3b880757abca ("dm: regulator: uclass driver code cleanup")
> Signed-off-by: Dan Carpenter <dan.carpen...@linaro.org>
> Reviewed-by: Patrice Chotard <patrice.chot...@foss.st.com>
> ---
>  drivers/power/regulator/regulator-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/regulator/regulator-uclass.c 
> b/drivers/power/regulator/regulator-uclass.c
> index 77d101f262e2..de2bb3b1cd88 100644
> --- a/drivers/power/regulator/regulator-uclass.c
> +++ b/drivers/power/regulator/regulator-uclass.c
> @@ -390,7 +390,7 @@ int regulator_list_autoset(const char *list_platname[],
>               ret = regulator_autoset_by_name(list_platname[i], &dev);
>               if (ret != -EMEDIUMTYPE && verbose)
>                       regulator_show(dev, ret);
> -             if (ret & !error)
> +             if (ret && !error)
>                       error = ret;
>  
>               if (list_devp)

Unfortunately this then leads to the (likely incorrect) test failing:
https://source.denx.de/u-boot/u-boot/-/jobs/898197#L290

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to