public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Cleanup unused OF nodes while parsing for child nodes
@ 2015-03-30  9:19 Ulf Hansson
  2015-03-30 13:37 ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2015-03-30  9:19 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson; +Cc: Hans de Goede

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/core/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index c296bc0..e6b0bdb 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1291,6 +1291,8 @@ struct device_node *mmc_of_find_child_device(struct mmc_host *host,
 	for_each_child_of_node(host->parent->of_node, node) {
 		if (mmc_of_get_func_num(node) == func_num)
 			return node;
+		else
+			of_node_put(node);
 	}
 
 	return NULL;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-31 11:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30  9:19 [PATCH] mmc: core: Cleanup unused OF nodes while parsing for child nodes Ulf Hansson
2015-03-30 13:37 ` Hans de Goede
2015-03-30 15:09   ` Ulf Hansson
2015-03-31  7:06     ` Hans de Goede
2015-03-31 11:28       ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox