Skip to contentSkip to conversation

can: Remove extra of_node_get in grcan

PATCH In review Liang He 2 participants 2 messages Jun 19, 2022 – Jun 21, 2022

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 can: Remove extra of_node_get in grcan

In grcan_probe(), of_find_node_by_path() has increased the refcount. There is no need to call of_node_get() again.

Fixes 1e93ed26acf0 (can: grcan: grcan_probe(): fix broken system id check for errata workaround needs)
---
 drivers/net/can/grcan.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/can/grcan.c +0 -1
index 76df4807d366..4c47c1055eff 100644
@@ -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))
Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Liang He

In grcan_probe(), of_find_node_by_path() has increased the refcount. There is no need to call of_node_get() again.

Fixes 1e93ed26acf0 (can: grcan: grcan_probe(): fix broken system id check for errata workaround needs)

Applied to linux-can/testing.

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |