[PATCH v4 13/21] w1: Clean up device iteration in w1_bus_find_dev

Simon Glass sjg at chromium.org
Thu Sep 29 12:00:38 CEST 2022


On Sun, 25 Sept 2022 at 02:31, Michal Suchanek <msuchanek at suse.de> wrote:
>
> The cycle is guarded by !ret && dev, code in if (ret || ! dev) is never
> executed. dev implies !ret, and ret is not even checked when getting
> next device, just drop the ret variable completely.
>
> Signed-off-by: Michal Suchanek <msuchanek at suse.de>
> ---
>  drivers/w1/w1-uclass.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list