diff options
Diffstat (limited to 'drivers/net/phy/phy_device.c')
| -rw-r--r-- | drivers/net/phy/phy_device.c | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 6a5056e0ae77..c8b0c34030d3 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -247,7 +247,7 @@ static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)  	 * MDIO bus driver and clock gated at this point.  	 */  	if (!netdev) -		return !phydev->suspended; +		goto out;  	if (netdev->wol_enabled)  		return false; @@ -267,7 +267,8 @@ static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)  	if (device_may_wakeup(&netdev->dev))  		return false; -	return true; +out: +	return !phydev->suspended;  }  static int mdio_bus_phy_suspend(struct device *dev) @@ -1792,7 +1793,7 @@ EXPORT_SYMBOL(genphy_restart_aneg);   */  int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart)  { -	int ret = 0; +	int ret;  	if (!restart) {  		/* Advertisement hasn't changed, but maybe aneg was never on to @@ -1807,9 +1808,9 @@ int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart)  	}  	if (restart) -		ret = genphy_restart_aneg(phydev); +		return genphy_restart_aneg(phydev); -	return ret; +	return 0;  }  EXPORT_SYMBOL(genphy_check_and_restart_aneg);  |