* [PATCH] dsa: mv88e6xxx: Drop duplicate declaration of 'ret' variable
@ 2015-04-16 13:49 Guenter Roeck
2015-04-16 16:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2015-04-16 13:49 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, linux-kernel, Andrew Lunn, Guenter Roeck
A duplicate declaration of 'ret' can result in hiding an error code.
Drop it.
Fixes: 17ee3e04ddbf ("net: dsa: Provide additional RMON statistics")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
Found by compiling the file with W=2.
drivers/net/dsa/mv88e6xxx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index f64186a5f634..12f186cb30cc 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -602,8 +602,6 @@ static void _mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,
u32 high = 0;
if (s->reg >= 0x100) {
- int ret;
-
ret = mv88e6xxx_reg_read(ds, REG_PORT(port),
s->reg - 0x100);
if (ret < 0)
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-16 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 13:49 [PATCH] dsa: mv88e6xxx: Drop duplicate declaration of 'ret' variable Guenter Roeck
2015-04-16 16:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).