Commit 7b66dfcc authored by Liang He's avatar Liang He Committed by Marc Kleine-Budde

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: 45721c40 ("can: rcar_canfd: Add support for r8a779a0 SoC")
Link: https://lore.kernel.org/all/20220712095623.364287-1-windhl@126.comSigned-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent db87c005
...@@ -1843,6 +1843,7 @@ static int rcar_canfd_probe(struct platform_device *pdev) ...@@ -1843,6 +1843,7 @@ static int rcar_canfd_probe(struct platform_device *pdev)
of_child = of_get_child_by_name(pdev->dev.of_node, name); of_child = of_get_child_by_name(pdev->dev.of_node, name);
if (of_child && of_device_is_available(of_child)) if (of_child && of_device_is_available(of_child))
channels_mask |= BIT(i); channels_mask |= BIT(i);
of_node_put(of_child);
} }
if (chip_id != RENESAS_RZG2L) { if (chip_id != RENESAS_RZG2L) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment