Re: [PATCH v2] net: ethernet: bgmac: Fix refcount leak in bcma_mdio_mii_register

From: Andrew Lunn
Date: Sun Jun 05 2022 - 13:54:05 EST


On Fri, Jun 03, 2022 at 05:32:38PM +0400, Miaoqian Lin wrote:
> of_get_child_by_name() returns a node pointer with refcount
> incremented, we should use of_node_put() on it when not need anymore.
> Add missing of_node_put() to avoid refcount leak.
>
> Fixes: 55954f3bfdac ("net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew