Commit a1672370 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Tony Lindgren

ARM: OMAP2+: gpmc: Remove unneeded of_node_put()

for_each_node_by_name() automatically calls of_node_put() on each
node passed; so don't do it explicitly unless there's an error.
Reported-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: default avatarJon Hunter <jon-hunter@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent bc6b1e7b
...@@ -1271,10 +1271,11 @@ static int gpmc_probe_dt(struct platform_device *pdev) ...@@ -1271,10 +1271,11 @@ static int gpmc_probe_dt(struct platform_device *pdev)
for_each_node_by_name(child, "nand") { for_each_node_by_name(child, "nand") {
ret = gpmc_probe_nand_child(pdev, child); ret = gpmc_probe_nand_child(pdev, child);
if (ret < 0) {
of_node_put(child); of_node_put(child);
if (ret < 0)
return ret; return ret;
} }
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment