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.przyw...@arm.com> --- 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; } -- 2.8.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot