[PATCH] power: regulator: Fix incorrect use of binary and
Andrew Goodbody
andrew.goodbody at linaro.org
Thu Aug 7 17:03:48 CEST 2025
On 14/07/2025 13:31, Quentin Schulz wrote:
> Hi Andrew,
>
> On 7/3/25 1:53 PM, Andrew Goodbody wrote:
>> 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 at linaro.org>
>
> That seems like what was intended according to the documentation found
> in include/power/regulator.h
>
> """
> Return: 0 on successfully setup of all list entries, otherwise first error.
> """
>
> Therefore:
>
> Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>
>
> Thanks!
> Quentin
Is there anything else needed before this can be merged please?
Thanks,
Andrew
More information about the U-Boot
mailing list