diff mbox

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

Message ID 1479257416-29389-10-git-send-email-andre.przywara@arm.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Andre Przywara Nov. 16, 2016, 12:50 a.m. UTC
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@arm.com>
---
 drivers/net/phy/micrel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Marek Vasut Nov. 16, 2016, 11:20 a.m. UTC | #1
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@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;
>  }
>
diff mbox

Patch

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;
 }