ARM: omap2: gpmc: Remove unneeded of_node_put()
Subsystems (5)
PATCH 1/1 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.
--- arch/arm/mach-omap2/gpmc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/gpmc.c +3 -2
@@ -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 ;
Signature · 1 line
1.7.8.6
PATCH 1/1 ARM: omap2: gpmc: Remove unneeded of_node_put()
Quoted 17 lines · Ezequiel Garcia
for_each_node_by_name()automatically callsof_node_put()on each node passed; so don't do it explicitly unless there's an error.Reported-by Mark Rutland <[email protected]>Signed-off-by Ezequiel Garcia <[email protected]>--- arch/arm/mach-omap2/gpmc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-omap2/gpmc.c +0
-0@@ -1271,9 +1271,10 @@ static int gpmc_probe_dt(struct platform_device *pdev)for_each_node_by_name (child,"nand" ) {
arch/arm/mach-omap2/gpmc.c static int gpmc_probe_dt(struct platform_device *pdev) · line 1280
Quoted 10 lines
arch/arm/mach-omap2/gpmc.c +3
-2ret =gpmc_probe_nand_child (pdev, child); -of_node_put (child); -if (ret <0 ) +if (ret <0 ) { +of_node_put (child);return ret; + } }return 0 ;
Thanks!
Jon
Tony Lindgren
maintainerPATCH 1/1 ARM: omap2: gpmc: Remove unneeded of_node_put()
Quoted 27 lines · Jon Hunter
Quoted 25 lines · Ezequiel Garcia
for_each_node_by_name()automatically callsof_node_put()on each node passed; so don't do it explicitly unless there's an error.Reported-by Mark Rutland <[email protected]>Signed-off-by Ezequiel Garcia <[email protected]>--- arch/arm/mach-omap2/gpmc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-omap2/gpmc.c +3
-2@@ -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; + } }
Quoted 4 lines
arch/arm/mach-omap2/gpmc.c static int gpmc_probe_dt(struct platform_device *pdev) · line 1280
Quoted 2 lines
arch/arm/mach-omap2/gpmc.c +0
-0return 0 ;Acked-by Jon Hunter <[email protected]>
Thanks applying into omap-for-v3.9/gpmc.
Tony