Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
}