Skip to contentSkip to conversation

dsa: mv88e6xxx: Drop duplicate declaration of 'ret' variable

PATCH Applied Guenter Roeck 2 participants 2 messages Apr 16, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dsa: mv88e6xxx: Drop duplicate declaration of 'ret' variable

A duplicate declaration of 'ret' can result in hiding an error code. Drop it.

Fixes 17ee3e04ddbf ("net: dsa: Provide additional RMON statistics")

---
Found by compiling the file with W=2.

 drivers/net/dsa/mv88e6xxx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/dsa/mv88e6xxx.c +0 -2
index f64186a5f634..12f186cb30cc 100644
@@ -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)
Signature · 1 line
2.1.0
maintainer Applied
#1 lore raw

From: Guenter Roeck <[email protected]>
Date: Thu, 16 Apr 2015 06:49:50 -0700

Quoted 5 lines

A duplicate declaration of 'ret' can result in hiding an error code. Drop it.

Fixes 17ee3e04ddbf ("net: dsa: Provide additional RMON statistics")

Applied, thank you.