Re: [PATCH] of: unittest: Fix np reference leak in of_unittest_bus_3cell_ranges()

From: Rob Herring

Date: Thu Sep 17 2026 - 13:19:15 EST


On Thu, Sep 17, 2026 at 7:46 AM Wentao Liang <vulab@xxxxxxxxxxx> wrote:
>
> of_range_parser_init() can fail when the node lacks a ranges property.
> That error path returns without dropping the reference taken by
> of_find_node_by_path(). Add the missing of_node_put().
>
> Fixes: 3d5089c4263d ("of/address: Add support for 3 address cell bus")
> Cc: stable@xxxxxxxxxxxxxxx

I don't really think we need backports for all of these.

> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
> drivers/of/unittest.c | 1 +
> 1 file changed, 1 insertion(+)

A general comment for all of these unittest fixes. I think we did a
pass of using the scoped cleanups, but if we could use those it would
be better.

Rob