mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
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: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
bc6b1e7b86
commit
a16723709c
@ -1271,9 +1271,10 @@ static int gpmc_probe_dt(struct platform_device *pdev)
|
||||
|
||||
for_each_node_by_name(child, "nand") {
|
||||
ret = gpmc_probe_nand_child(pdev, child);
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user