Skip to contentSkip to conversation

drivers:staging:qlge: Removed unnecessary variable

PATCH New Aliasgar Surti 1 participant 1 message Sep 18, 2019

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

PATCH 1/1 drivers:staging:qlge: Removed unnecessary variable

From: Aliasgar Surti <[email protected]>

coccicheck reported warning for unnecessary variable used. This patch fixes the same by removing the variable and returning value directly.

---
 drivers/staging/qlge/qlge_dbg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/qlge/qlge_dbg.c +1 -2
index 31389ab..5599525 100644
@@ -389,7 +389,6 @@ static int ql_get_xgmac_regs(struct ql_adapter *qdev, u32 *buf,
 
 static int ql_get_ets_regs(struct ql_adapter *qdev, u32 *buf)
 {
-	int status = 0;
 	int i;
 
 	for (i = 0; i < 8; i++, buf++) {
@@ -402,7 +401,7 @@ static int ql_get_ets_regs(struct ql_adapter *qdev, u32 *buf)
 		*buf = ql_read32(qdev, CNA_ETS);
 	}
 
-	return status;
+	return 0;
 }
 
 static void ql_get_intr_states(struct ql_adapter *qdev, u32 *buf)
Signature · 1 line
2.7.4