]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/phy/phy-c45.c
net: phy: corrected the return value for genphy_check_and_restart_aneg and genphy_c45...
[linux.git] / drivers / net / phy / phy-c45.c
index a1caeee1223617dab21b488858b14b5d0ef2aa2a..dd2e23fb67c068674144f5c1afc97ca682bb6b8f 100644 (file)
@@ -167,7 +167,7 @@ EXPORT_SYMBOL_GPL(genphy_c45_restart_aneg);
  */
 int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart)
 {
-       int ret = 0;
+       int ret;
 
        if (!restart) {
                /* Configure and restart aneg if it wasn't set before */
@@ -180,9 +180,9 @@ int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart)
        }
 
        if (restart)
-               ret = genphy_c45_restart_aneg(phydev);
+               return genphy_c45_restart_aneg(phydev);
 
-       return ret;
+       return 0;
 }
 EXPORT_SYMBOL_GPL(genphy_c45_check_and_restart_aneg);