mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: stmmac: dwmac-sun8i: Fix EPHY clock leak in get_ephy_nodes()
get_ephy_nodes() stores the clock returned by of_clk_get() directly in gmac->ephy_clk before the reset control is obtained. When the reset lookup fails, the loop continues or returns without releasing that clock, and sun8i_dwmac_probe() then jumps to dwmac_remove, which does not call clk_put(). Keep the clock in a local variable and release it on the error paths. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260917113654.2149268-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6598456d72
commit
d9750b3c4c
1 changed files with 6 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue