staging: rtl8712: rtl871x_mp.c: Compress two lines into one line
authorPayal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Mon, 1 Apr 2019 06:20:21 +0000 (11:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2019 17:31:11 +0000 (19:31 +0200)
Challenge suggested by coccinelle.
Compresse two lines into one line and remove unnecessary variable.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_mp.c

index 1d5364f5a51890dafc9ad037f514016b010116f5..ba379506da3fd1e6cbc7c312979d440348e947c7 100644 (file)
@@ -697,15 +697,14 @@ void r8712_ResetPhyRxPktCount(struct _adapter *pAdapter)
 static u32 GetPhyRxPktCounts(struct _adapter *pAdapter, u32 selbit)
 {
        /*selection*/
-       u32 phyrx_set = 0, count = 0;
+       u32 phyrx_set = 0;
        u32 SelectBit;
 
        SelectBit = selbit << 28;
        phyrx_set |= (SelectBit & 0xF0000000);
        r8712_write32(pAdapter, RXERR_RPT, phyrx_set);
        /*Read packet count*/
-       count = r8712_read32(pAdapter, RXERR_RPT) & RPTMaxCount;
-       return count;
+       return r8712_read32(pAdapter, RXERR_RPT) & RPTMaxCount;
 }
 
 u32 r8712_GetPhyRxPktReceived(struct _adapter *pAdapter)