提交 a1672370 编写于 作者: E Ezequiel Garcia 提交者: 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: NMark Rutland <mark.rutland@arm.com>
Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: NJon Hunter <jon-hunter@ti.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 bc6b1e7b
......@@ -1271,10 +1271,11 @@ static int gpmc_probe_dt(struct platform_device *pdev)
for_each_node_by_name(child, "nand") {
ret = gpmc_probe_nand_child(pdev, child);
if (ret < 0) {
of_node_put(child);
if (ret < 0)
return ret;
}
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册