Re: [PATCH] net: dsa: Add missing of_node_put() in dsa_port_parse_of

From: Paolo Abeni
Date: Thu Mar 17 2022 - 08:12:59 EST


On Wed, 2022-03-16 at 08:26 +0000, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
>
> Fixes: 6d4e5c570c2d ("net: dsa: get port type at parse time")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>

LGTM, thanks!

For the records, it looks like there is a similar issue in
net/dsa/port.c: dsa_port_link_register_of().

Thanks!

Paolo