Skip to content

Commit

Permalink
powerpc/82xx: Delete an unnecessary of_node_put() call in pq2ads_pci_…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Markus Elfring authored and Michael Ellerman committed Jan 31, 2021
1 parent 6e7a4da commit 60aece4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 60aece4

Please sign in to comment.