]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: stmmac: simplify stmmac_init_phy()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 23 Sep 2025 11:26:24 +0000 (12:26 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Sep 2025 00:40:23 +0000 (17:40 -0700)
commit50acea3662bf54f3ea2cb6ca2db66ca3b1a0a0ee
tree5881f7fe82a4a6aa11bfc70d50857fdb5ee2b3d9
parentdb299a0c09e98e5fc7e7b181d7f2b94560330a8c
net: stmmac: simplify stmmac_init_phy()

If we fail to attach a PHY, there is no point trying to configure WoL
settings. Exit the function after printing the "cannot attach to PHY"
error, and remove the now unnecessary code indentation for configuring
the LPI timer in phylink. Since we know that "ret" must be zero at this
point, change the final return to use a constant rather than "ret".

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/E1v11A8-0000000774M-3pmH@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c