Re: [PATCH net v2] net: rtsn: fix mdio_node leak in rtsn_mdio_alloc()

From: Andrew Lunn

Date: Tue May 05 2026 - 08:32:48 EST


On Tue, May 05, 2026 at 02:28:40PM +0530, Shitalkumar Gandhi wrote:
> of_get_child_by_name() takes a reference. The rtsn_reset() and
> rtsn_change_mode() failure paths jump to out_free_bus and leak
> mdio_node.
>
> Add out_put_node to drop it before falling through.
>
> Fixes: b0d3969d2b4d ("net: ethernet: rtsn: Add support for Renesas Ethernet-TSN")
> Signed-off-by: Shitalkumar Gandhi <shitalkumar.gandhi@xxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> Changes in v2:
> - Restore blank line between `return 0;` and `out_put_node:` label (Geert)
> - Add Reviewed-by: Geert Uytterhoeven

Please always create a new thread for a new version of the
patch. Without that, the CI system just sees a comment to an existing
patch, and does not run. So this patch has not been through usual
testing, and will be ignored.

Andrew