aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-08-27 08:44:20 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-01-31 22:35:50 +1100
commit60aece416483fdf7e51728a3518438e0458bdabb (patch)
tree327fd54d953acde0dc4bd8e55842d3e7aca34827
parentpowerpc/pseries: Delete an error message for a failed string duplication in dlpar_store() (diff)
downloadlinux-dev-60aece416483fdf7e51728a3518438e0458bdabb.tar.xz
linux-dev-60aece416483fdf7e51728a3518438e0458bdabb.zip
powerpc/82xx: Delete an unnecessary of_node_put() call in pq2ads_pci_init_irq()
A null pointer would be passed to a call of the function “of_node_put” immediately after a call of the function “of_find_compatible_node” failed at one place. Remove this superfluous function call. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/9c060a41-438b-6fb8-d549-37c72fae4898@web.de
-rw-r--r--arch/powerpc/platforms/82xx/pq2ads-pci-pic.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
index 096cc0d59fd8..6cc054db7043 100644
--- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
+++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
@@ -123,7 +123,6 @@ int __init pq2ads_pci_init_irq(void)
np = of_find_compatible_node(NULL, NULL, "fsl,pq2ads-pci-pic");
if (!np) {
printk(KERN_ERR "No pci pic node in device tree.\n");
- of_node_put(np);
goto out;
}