]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: dwmac-mediatek: fix resource leak in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 28 Jul 2022 11:52:09 +0000 (14:52 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Jul 2022 17:43:04 +0000 (10:43 -0700)
commit026ca4c11094c820c6e9d1af05bb24095347c1fc
tree86507bdbfcd1e69f12dcf756af11f3f9fb702dac
parentf79339d4aab466eb877a24adb4dd6ab647e6811c
stmmac: dwmac-mediatek: fix resource leak in probe

If mediatek_dwmac_clks_config() fails, then call stmmac_remove_config_dt()
before returning.  Otherwise it is a resource leak.

Fixes: b3fe7ba18206 ("stmmac: dwmac-mediatek: fix clock issue")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YuJ4aZyMUlG6yGGa@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c