Skip to content

Commit

Permalink
net: phy: remove phy_error from phy_disable_interrupts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Mar 7, 2018
1 parent 4d1e46a commit 4fff2d3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 4fff2d3

Please sign in to comment.