[U-Boot] [PATCH 09/12] phy: micrel: add missing braces

Marek Vasut marex at denx.de
Wed Nov 16 12:20:45 CET 2016


On 11/16/2016 01:50 AM, Andre Przywara wrote:
> The error checking makes only sense if the previous line has been
> executed, so add block braces around the _whole_ then clause.
> 
> Pointed out by GCC 6.2's -Wmisleading-indentation warning.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>

Already fixed

https://patchwork.ozlabs.org/patch/694537/

> ---
>  drivers/net/phy/micrel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 9ea3105..afcd1a6 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -300,10 +300,11 @@ static int ksz9021_of_config(struct phy_device *phydev)
>  	};
>  	int i, ret = 0;
>  
> -	for (i = 0; i < ARRAY_SIZE(ofcfg); i++)
> +	for (i = 0; i < ARRAY_SIZE(ofcfg); i++) {
>  		ret = ksz90x1_of_config_group(phydev, &(ofcfg[i]));
>  		if (ret)
>  			return ret;
> +	}
>  
>  	return 0;
>  }
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list