lkml.org 
[lkml]   [2021]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] PCI/hotplug: Remove unneeded of_node_put() in pnv_php
Date
Fix following coccicheck warning:
./drivers/pci/hotplug/pnv_php.c:161:2-13: ERROR: probable double put.

Device node iterators put the previous value of the index variable, so
an explicit put causes a double put.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
drivers/pci/hotplug/pnv_php.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index f4c2e6e01be0..f3da4f95d73f 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -158,7 +158,6 @@ static void pnv_php_detach_device_nodes(struct device_node *parent)
for_each_child_of_node(parent, dn) {
pnv_php_detach_device_nodes(dn);

- of_node_put(dn);
of_detach_node(dn);
}
}
--
2.20.1
\
 
 \ /
  Last update: 2021-10-20 11:47    [W:0.059 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site