]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: corrected the return value for genphy_check_and_restart_aneg and genphy_c45...
authorSudheesh Mavila <sudheesh.mavila@amd.com>
Wed, 26 Feb 2020 07:10:45 +0000 (12:40 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 04:41:42 +0000 (20:41 -0800)
commit7ddc899f8f2ddc6041f49c8c79c3790237619987
tree27c10b7532610b657ff1ea9ba58a3c37972e9471
parentd3cec769ed031722564e95a171a46d69fc67278c
net: phy: corrected the return value for genphy_check_and_restart_aneg and genphy_c45_check_and_restart_aneg

When auto-negotiation is not required, return value should be zero.

Changes v1->v2:
- improved comments and code as Andrew Lunn and Heiner Kallweit suggestion
- fixed issue in genphy_c45_check_and_restart_aneg as Russell King
  suggestion.

Fixes: 595663494dda ("net: phy: add genphy_check_and_restart_aneg()")
Fixes: da3beefc8feb ("net: phy: add genphy_c45_check_and_restart_aneg()")
Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
Reviewed-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-c45.c
drivers/net/phy/phy_device.c