Re: [PATCH] net: mdio: mdio-mux: fix device_node reference leak on success
From: Andrew Lunn
Date: Thu Oct 08 2026 - 14:23:31 EST
On Fri, Oct 09, 2026 at 01:56:12AM +0800, Haotian Zhang wrote:
> mdio_mux_init() obtains a reference to the parent bus device_node with
> of_parse_phandle() when no mux_bus is passed in. All error paths release
> it through err_parent_bus, but the success path at the end of the
> function returns without calling of_node_put(). of_mdio_find_bus() only
> takes a reference to the embedded struct device, so the device_node
> reference is leaked for every multiplexer that probes successfully.
What would happen if the parent bus was to go away?
Andrew
---
pw-bot: cr