Skip to content

Commit 32a6637

Browse files
Nicolas Saenz Juliennegregkh
authored andcommitted
fpga: stratix10-soc: fix wrong of_node_put() in init function
After finding a "firmware" dt node stratix10 tries to match it's compatible string with it. To do so it's calling of_find_matching_node() which already takes care of decreasing the refcount on the "firmware" node. We are then incorrectly decreasing the refcount on that node again. This patch removes the unwarranted call to of_node_put(). Fixes: e7eef1d ("fpga: add intel stratix10 soc fpga manager driver") Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Alan Tull <atull@kernel.org> Acked-by: Moritz Fischer <mdf@kernel.org> [atull: remove unnecessary braces] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5aa6083 commit 32a6637

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/fpga/stratix10-soc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,11 @@ static int __init s10_init(void)
508508
return -ENODEV;
509509

510510
np = of_find_matching_node(fw_np, s10_of_match);
511-
if (!np) {
512-
of_node_put(fw_np);
511+
if (!np)
513512
return -ENODEV;
514-
}
515513

516514
of_node_put(np);
517515
ret = of_platform_populate(fw_np, s10_of_match, NULL, NULL);
518-
of_node_put(fw_np);
519516
if (ret)
520517
return ret;
521518

0 commit comments

Comments
 (0)