]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: minor cleanups to stmmac_bus_clks_config()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 27 Aug 2025 08:54:51 +0000 (09:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Aug 2025 23:44:34 +0000 (16:44 -0700)
commit2584ed250a371681b353cee89e273b25c31c25d4
treedcaa0c4991f16c3b9fb997653ca7962de941eb91
parentbafdd920a060eb1bad51c1c70b9850403548252f
net: stmmac: minor cleanups to stmmac_bus_clks_config()

stmmac_bus_clks_config() doesn't need to repeatedly on dereference
priv->plat as this remains the same throughout this function. Not only
does this detract from the function's readability, but it could cause
the value to be reloaded each time. Use a local variable.

Also, the final return can simply return zero, and we can dispense
with the initialiser for 'ret'.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/E1urBvf-000000002ii-37Ce@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c