Re: [PATCH v2] net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register

From: Andrew Lunn
Date: Thu May 26 2022 - 08:18:52 EST


On Thu, May 26, 2022 at 03:24:15PM +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 done.
> This function missing of_node_put() in an error path.
> Add missing of_node_put() to avoid refcount leak.

What about releasing the reference on the non error case?
Where is that.

Andrew