staging: qlge: Removed unnecessary variable
authorAliasgar Surti <aliasgar.surti500@gmail.com>
Wed, 18 Sep 2019 13:16:36 +0000 (18:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Sep 2019 19:57:59 +0000 (21:57 +0200)
coccicheck reported warning for unnecessary variable used.
This patch fixes the same by removing the variable and
returning value directly.

Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
Link: https://lore.kernel.org/r/1568812596-25926-1-git-send-email-aliasgar.surti500@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge_dbg.c

index 31389ab..5599525 100644 (file)
@@ -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)