summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/gpmc.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2013-01-25 12:19:47 (GMT)
committerTony Lindgren <tony@atomide.com>2013-02-01 21:55:45 (GMT)
commita16723709cff6d69567024c28d32d1344f08cecf (patch)
tree0a6f7d10b58a34fc6f1ad253057299f8bb3e8486 /arch/arm/mach-omap2/gpmc.c
parentbc6b1e7b86f5d8e4a6fc1c0189e64bba4077efe0 (diff)
downloadlinux-fsl-qoriq-a16723709cff6d69567024c28d32d1344f08cecf.tar.xz
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>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r--arch/arm/mach-omap2/gpmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 01ce462..c6255f7 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -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;