aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/aquantia_main.c
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2022-01-28 21:32:40 +0300
committerDavid S. Miller <davem@davemloft.net>2022-01-31 11:30:56 +0000
commit73c105ad2a3e142d81fc59761ce8353d0b211b8f (patch)
tree5fd499167ca8b5770bcfda9a932465f8ee5b4d43 /drivers/net/phy/aquantia_main.c
parentMerge branch 'dsa-mv88e6xxx-Improve-indirect-addressing-performance' (diff)
downloadlinux-dev-73c105ad2a3e142d81fc59761ce8353d0b211b8f.tar.xz
linux-dev-73c105ad2a3e142d81fc59761ce8353d0b211b8f.zip
phy: make phy_set_max_speed() *void*
After following the call tree of phy_set_max_speed(), it became clear that this function never returns anything but 0, so we can change its result type to *void* and drop the result checks from the three drivers that actually bothered to do it... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/aquantia_main.c')
-rw-r--r--drivers/net/phy/aquantia_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c
index 968dd43a2b1e..a8db1a19011b 100644
--- a/drivers/net/phy/aquantia_main.c
+++ b/drivers/net/phy/aquantia_main.c
@@ -533,9 +533,7 @@ static int aqcs109_config_init(struct phy_device *phydev)
* PMA speed ability bits are the same for all members of the family,
* AQCS109 however supports speeds up to 2.5G only.
*/
- ret = phy_set_max_speed(phydev, SPEED_2500);
- if (ret)
- return ret;
+ phy_set_max_speed(phydev, SPEED_2500);
return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT);
}