Skip to content

Commit 7b66dfc

Browse files
windhlmarckleinebudde
authored andcommitted
can: rcar_canfd: Add missing of_node_put() in rcar_canfd_probe()
We should use of_node_put() for the reference returned by of_get_child_by_name() which has increased the refcount. Fixes: 45721c4 ("can: rcar_canfd: Add support for r8a779a0 SoC") Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Liang He <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent db87c00 commit 7b66dfc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/can/rcar/rcar_canfd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,7 @@ static int rcar_canfd_probe(struct platform_device *pdev)
18431843
of_child = of_get_child_by_name(pdev->dev.of_node, name);
18441844
if (of_child && of_device_is_available(of_child))
18451845
channels_mask |= BIT(i);
1846+
of_node_put(of_child);
18461847
}
18471848

18481849
if (chip_id != RENESAS_RZG2L) {

0 commit comments

Comments
 (0)