[PATCH net] net: ethernet: mtk_eth_soc: fix error handling in mtk_open()

Russell King (Oracle) linux at armlinux.org.uk
Thu Nov 17 04:34:35 PST 2022


On Thu, Nov 17, 2022 at 07:13:56PM +0800, Liu Jian wrote:
> If mtk_start_dma() fails, invoke phylink_disconnect_phy() to perform
> cleanup. phylink_disconnect_phy() contains the put_device action. If
> phylink_disconnect_phy is not performed, the Kref of netdev will leak.
> 
> Fixes: b8fc9f30821e ("net: ethernet: mediatek: Add basic PHYLINK support")
> Signed-off-by: Liu Jian <liujian56 at huawei.com>

Looks sensible to me.

Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list