summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2018-03-05 22:34:27 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-07 12:30:20 -0500
commit4fff2d33c707938c537b7aeb2c511226f8a20313 (patch)
tree03574d029ed0ee18a1f14d876f9958f3504b38bc /drivers
parent4d1e46a55ea9f8d693ceabe1ba4b056e55fb6625 (diff)
downloadlinux-4fff2d33c707938c537b7aeb2c511226f8a20313.tar.bz2
net: phy: remove phy_error from phy_disable_interrupts
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index a6f924fee584..c5aa773eacdc 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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);
}
/**