Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: micrel: simplify return in ksz9477_phy_errata()

ksz9477_phy_errata function currently assigns the return value of
genphy_restart_aneg() to a variable and then immediately returns it

err = genphy_restart_aneg(phydev);
if (err)
return err;

return err;

This can be simplified by directly returning the function call
result, as the intermediate variable and conditional are redundant.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251017193525.1457064-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alok Tiwari and committed by
Jakub Kicinski
3dfdc98d 88224095

+1 -5
+1 -5
drivers/net/phy/micrel.c
··· 2095 2095 return err; 2096 2096 } 2097 2097 2098 - err = genphy_restart_aneg(phydev); 2099 - if (err) 2100 - return err; 2101 - 2102 - return err; 2098 + return genphy_restart_aneg(phydev); 2103 2099 } 2104 2100 2105 2101 static int ksz9477_config_init(struct phy_device *phydev)