]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: fix stmmac_xdp_open() clk_ptp_ref error cleanup
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 11 Sep 2025 11:09:52 +0000 (12:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 14 Sep 2025 19:01:03 +0000 (12:01 -0700)
commit586f1aebc9a112d5e76af045e38fda0632176fae
treec547629c633096413d90f7ab30cee78ffc22ea07
parent454bbe5913b2c56a3b4c5bf85138b5382ba8b8e6
net: stmmac: fix stmmac_xdp_open() clk_ptp_ref error cleanup

Neither stmmac_xdp_release() nor the normal paths of stmmac_xdp_open()
touch clk_ptp_ref, so stmmac_xdp_open() should not be doing anything
with this clock. However, in its error path, it calls
stmmac_hw_teardown() which disables and unprepares this clock, which
can lead to the clock state becoming unbalanced when the netdev is
taken administratively down.

Remove this call to stmmac_hw_teardown(), and as this is the last user
of this function, remove the function as well.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c