netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: Remove extra of_node_get in grcan
@ 2022-06-19  7:02 Liang He
  2022-06-21 22:36 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2022-06-19  7:02 UTC (permalink / raw)
  To: wg, mkl, davem, edumazet, kuba, pabeni
  Cc: windhl, linux-can, netdev, linux-kernel

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)

Signed-off-by: Liang He <windhl@126.com>
---
 drivers/net/can/grcan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
index 76df4807d366..4c47c1055eff 100644
--- a/drivers/net/can/grcan.c
+++ b/drivers/net/can/grcan.c
@@ -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))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] can: Remove extra of_node_get in grcan
  2022-06-19  7:02 [PATCH] can: Remove extra of_node_get in grcan Liang He
@ 2022-06-21 22:36 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2022-06-21 22:36 UTC (permalink / raw)
  To: Liang He; +Cc: linux-can, netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

On 19.06.2022 15:02:57, Liang He wrote:
> 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)
> 
> Signed-off-by: Liang He <windhl@126.com>

Applied to linux-can/testing.

Thanks,
Marc

-- 
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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-21 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-19  7:02 [PATCH] can: Remove extra of_node_get in grcan Liang He
2022-06-21 22:36 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).