From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: phy: micrel: Fix error handling
Date: Mon, 14 Nov 2016 15:08:42 +0100 [thread overview]
Message-ID: <20161114140842.7122-1-marex@denx.de> (raw)
Fix the following error, the $ret variable handling must
be part of the loop, while due to the missing parenthesis
it was not.
drivers/net/phy/micrel.c: In function ?ksz9021_of_config?:
drivers/net/phy/micrel.c:303:2: warning: this ?for? clause does not guard... [-Wmisleading-indentation]
for (i = 0; i < ARRAY_SIZE(ofcfg); i++)
^~~
drivers/net/phy/micrel.c:305:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ?for?
if (ret)
^~
drivers/net/phy/micrel.c: In function ?ksz9031_of_config?:
drivers/net/phy/micrel.c:411:2: warning: this ?for? clause does not guard... [-Wmisleading-indentation]
for (i = 0; i < ARRAY_SIZE(ofcfg); i++)
^~~
drivers/net/phy/micrel.c:413:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ?for?
if (ret)
^~
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
---
drivers/net/phy/micrel.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 28a1401..7163fa2 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;
}
@@ -408,10 +409,11 @@ static int ksz9031_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.10.2
next reply other threads:[~2016-11-14 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 14:08 Marek Vasut [this message]
2016-11-15 3:48 ` [U-Boot] [PATCH] net: phy: micrel: Fix error handling Joe Hershberger
2016-12-01 0:49 ` [U-Boot] " Joe Hershberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161114140842.7122-1-marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.