net: phy: remove phy_error from phy_disable_interrupts
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 5 Mar 2018 21:34:27 +0000 (22:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Mar 2018 17:30:20 +0000 (12:30 -0500)
All callers of phy_disable_interrupts() call phy_error() in the error
case. Therefore we don't need to do this within the function too.
This change also allows us to use phy_disable_interrupts() in code
holding phydev->lock (because phy_error() can take this lock).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c

index a6f924fee5840ddee83a4159f59f3231dbf49655..c5aa773eacdcd25727d0a833796a23b8c7ceb899 100644 (file)
@@ -662,19 +662,10 @@ static int phy_disable_interrupts(struct phy_device *phydev)
        /* Disable PHY interrupts */
        err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED);
        if (err)
-               goto phy_err;
+               return err;
 
        /* Clear the interrupt */
-       err = phy_clear_interrupt(phydev);
-       if (err)
-               goto phy_err;
-
-       return 0;
-
-phy_err:
-       phy_error(phydev);
-
-       return err;
+       return phy_clear_interrupt(phydev);
 }
 
 /**