Signed-off-by: Ulf Hansson <[email protected]>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to