can: grcan: grcan_probe(): remove extra of_node_get()
authorLiang He <windhl@126.com>
Sun, 19 Jun 2022 07:02:57 +0000 (15:02 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Jul 2022 09:42:59 +0000 (11:42 +0200)
In grcan_probe(), of_find_node_by_path() has already increased the
refcount. There is no need to call of_node_get() again, so remove it.

Link: https://lore.kernel.org/all/20220619070257.4067022-1-windhl@126.com
Fixes: 1e93ed26acf0 ("can: grcan: grcan_probe(): fix broken system id check for errata workaround needs")
Cc: stable@vger.kernel.org # v5.18
Cc: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/grcan.c

index 76df4807d3666b3dc5abc332b29f33c29f1f0591..4c47c1055eff9367c009f88352b33f60df172aad 100644 (file)
@@ -1646,7 +1646,6 @@ static int grcan_probe(struct platform_device *ofdev)
         */
        sysid_parent = of_find_node_by_path("/ambapp0");
        if (sysid_parent) {
-               of_node_get(sysid_parent);
                err = of_property_read_u32(sysid_parent, "systemid", &sysid);
                if (!err && ((sysid & GRLIB_VERSION_MASK) >=
                             GRCAN_TXBUG_SAFE_GRLIB_VERSION))