net: tg3: fix obsolete check of !err
authorJean Sacren <sakiwit@gmail.com>
Wed, 6 Oct 2021 06:41:20 +0000 (00:41 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Oct 2021 14:17:28 +0000 (15:17 +0100)
The err variable is checked for true or false a few lines above.  When
!err is checked again, it always evaluates to true.  Therefore we should
skip this check.

We should also group the adjacent statements together for readability.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c

index d95b114..5a50ea7 100644 (file)
@@ -11213,12 +11213,8 @@ static void tg3_reset_task(struct work_struct *work)
        }
 
        tg3_netif_start(tp);
-
        tg3_full_unlock(tp);
-
-       if (!err)
-               tg3_phy_start(tp);
-
+       tg3_phy_start(tp);
        tg3_flag_clear(tp, RESET_TASK_PENDING);
 out:
        rtnl_unlock();