diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-08-10 14:14:15 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-10 14:14:15 +0300 |
commit | 1d0f49e14007a5426eb7e9e5808168cdb77b3e7f (patch) | |
tree | 1d7eb036e06938dedb7488910e4d34dc4c73fa68 /sound/soc/generic/audio-graph-card.c | |
parent | 99504819fc643160afd6813921b1d42b18e52a49 (diff) | |
parent | e93c17301ac55321fc18e0f8316e924e58a83c8c (diff) | |
download | linux-1d0f49e14007a5426eb7e9e5808168cdb77b3e7f.tar.xz |
Merge branch 'x86/urgent' into x86/asm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/soc/generic/audio-graph-card.c')
-rw-r--r-- | sound/soc/generic/audio-graph-card.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 105ec3a6e30d..de2550c7a96b 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -224,9 +224,11 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv) of_for_each_phandle(&it, rc, node, "dais", NULL, 0) { ret = asoc_graph_card_dai_link_of(it.node, priv, idx++); - of_node_put(it.node); - if (ret < 0) + if (ret < 0) { + of_node_put(it.node); + return ret; + } } return asoc_simple_card_parse_card_name(card, NULL); @@ -239,10 +241,8 @@ static int asoc_graph_get_dais_count(struct device *dev) int count = 0; int rc; - of_for_each_phandle(&it, rc, node, "dais", NULL, 0) { + of_for_each_phandle(&it, rc, node, "dais", NULL, 0) count++; - of_node_put(it.node); - } return count; } |