[PATCHv2 1/2] ASoC: simple-card: Fix bug of forgetting decrement DT node's refcount

From: Xiubo Li
Date: Sun Aug 31 2014 - 22:27:00 EST


We shouldn't forget decrement the last DT node when the
for_each_child_of_node() has finished searching.

Signed-off-by: Xiubo Li <Li.Xiubo@xxxxxxxxxxxxx>
---
sound/soc/generic/simple-card.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index fd8b045..9e170fe 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -360,6 +360,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
}
i++;
}
+ of_node_put(np);
} else {
ret = asoc_simple_card_dai_link_of(node, dev,
dai_link, dai_props, true);
--
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/