From: Heiner Kallweit Date: Sat, 15 Feb 2020 13:48:03 +0000 (+0100) Subject: r8169: remove unneeded check from rtl_link_chg_patch X-Git-Tag: baikal/aarch64/sdk6.1~9689^2~419^2~6 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=d0dae3e4a4cdce79f828e6c21beea6b43b8890c1;p=kernel.git r8169: remove unneeded check from rtl_link_chg_patch rtl_link_chg_patch() can be called from rtl_open() to rtl8169_close() only. And in rtl8169_close() phy_stop() ensures that this function isn't called afterwards. So we don't need this check. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index a2168a14794c7..b6614f15af0a9 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -1325,12 +1325,8 @@ static void rtl8169_irq_mask_and_ack(struct rtl8169_private *tp) static void rtl_link_chg_patch(struct rtl8169_private *tp) { - struct net_device *dev = tp->dev; struct phy_device *phydev = tp->phydev; - if (!netif_running(dev)) - return; - if (tp->mac_version == RTL_GIGA_MAC_VER_34 || tp->mac_version == RTL_GIGA_MAC_VER_38) { if (phydev->speed == SPEED_1000) {