Commit 3e13274c authored by Johan Hovold's avatar Johan Hovold Committed by Jakub Kicinski
Browse files

net: mtk_eth_soc: fix device leak at probe



The reference count to the WED devices has already been incremented when
looking them up using of_find_device_by_node() so drop the bogus
additional reference taken during probe.

Fixes: 804775df ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Cc: stable@vger.kernel.org	# 5.19
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250725171213.880-5-johan@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent da717540
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2782,7 +2782,6 @@ void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,
	if (!pdev)
		goto err_of_node_put;

	get_device(&pdev->dev);
	irq = platform_get_irq(pdev, 0);
	if (irq < 0)
		goto err_put_device;