summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-07-12 17:56:23 +0800
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-07-20 10:20:19 +0200
commit7b66dfcc6e1e1f018492619c3d0fc432b6b54272 (patch)
treed5b35f019f44b6f3459214efa647a0a73f10e949 /drivers
parentdb87c005b9cce0b815b2268963502c178a1e27c8 (diff)
downloadlwn-7b66dfcc6e1e1f018492619c3d0fc432b6b54272.tar.gz
lwn-7b66dfcc6e1e1f018492619c3d0fc432b6b54272.zip
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: 45721c406dcf ("can: rcar_canfd: Add support for r8a779a0 SoC") Link: https://lore.kernel.org/all/20220712095623.364287-1-windhl@126.com Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/rcar/rcar_canfd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index ba42cef10a53..cb0321ea853c 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -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);
if (of_child && of_device_is_available(of_child))
channels_mask |= BIT(i);
+ of_node_put(of_child);
}
if (chip_id != RENESAS_RZG2L) {