diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-08-04 16:49:38 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-04 16:50:18 +0200 |
commit | 74be62c7cefbf320e0605f3da6639ef80448ff00 (patch) | |
tree | ea45fa2e0b343b792a03a66058b26a8d3e736787 /sound/soc/generic/audio-graph-card.c | |
parent | ALSA: hda: constify pci_device_id. (diff) | |
parent | Merge tag 'asoc-fix-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-74be62c7cefbf320e0605f3da6639ef80448ff00.tar.xz linux-74be62c7cefbf320e0605f3da6639ef80448ff00.zip |
Merge branch 'for-linus' into for-next
Back-merge 4.13-rc devel branch for later development.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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; } |