]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk_eth_soc: fix possible memory leak in mtk_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 17 Oct 2022 03:51:54 +0000 (11:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Oct 2022 08:35:05 +0000 (09:35 +0100)
commit26d1ef83ded25ac997c71be7858673147f777463
treeef060890a45dbfcdf4ff2211159dfe5d33ea8791
parentf94899bef8bcf04a8f900fa03b835914ad140452
net: ethernet: mtk_eth_soc: fix possible memory leak in mtk_probe()

If mtk_wed_add_hw() has been called, mtk_wed_exit() needs be called
in error path or removing module to free the memory allocated in
mtk_wed_add_hw().

Fixes: 7e7e0fcc79f5 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c