lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mips: ralink: add missing of_node_put() call in ill_acc_of_setup()
Date
From: Wang Qing <wangqing@vivo.com>

of_find_compatible_node() takes a reference to the device_node
which needs to be dropped when done.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
arch/mips/ralink/ill_acc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/mips/ralink/ill_acc.c b/arch/mips/ralink/ill_acc.c
index bdf5380..115a69f
--- a/arch/mips/ralink/ill_acc.c
+++ b/arch/mips/ralink/ill_acc.c
@@ -65,6 +65,7 @@ static int __init ill_acc_of_setup(void)
}

irq = irq_of_parse_and_map(np, 0);
+ of_node_put(np);
if (!irq) {
dev_err(&pdev->dev, "failed to get irq\n");
put_device(&pdev->dev);
--
2.7.4
\
 
 \ /
  Last update: 2021-12-09 13:21    [W:0.020 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site