diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-08-17 09:46:27 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-17 09:46:27 +0200 |
commit | c0a7f9372cf0fc9bd0a73eb287664e26e5b18f1e (patch) | |
tree | c9c7b7b048b1d0e59917144d6769a08282ebca8b /sound/pci/hda/hda_generic.c | |
parent | 327b34f2a97d72c41d4854d61336c9ae6ffe4a44 (diff) | |
parent | 4bf61ad5f0204b67ba570da6e5c052c2095e29df (diff) | |
download | lwn-c0a7f9372cf0fc9bd0a73eb287664e26e5b18f1e.tar.gz lwn-c0a7f9372cf0fc9bd0a73eb287664e26e5b18f1e.zip |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r-- | sound/pci/hda/hda_generic.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index f46d4e7f499c..3bf5e3410703 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -3460,7 +3460,7 @@ static int cap_put_caller(struct snd_kcontrol *kcontrol, struct hda_gen_spec *spec = codec->spec; const struct hda_input_mux *imux; struct nid_path *path; - int i, adc_idx, err = 0; + int i, adc_idx, ret, err = 0; imux = &spec->input_mux; adc_idx = kcontrol->id.index; @@ -3470,9 +3470,13 @@ static int cap_put_caller(struct snd_kcontrol *kcontrol, if (!path || !path->ctls[type]) continue; kcontrol->private_value = path->ctls[type]; - err = func(kcontrol, ucontrol); - if (err < 0) + ret = func(kcontrol, ucontrol); + if (ret < 0) { + err = ret; break; + } + if (ret > 0) + err = 1; } mutex_unlock(&codec->control_mutex); if (err >= 0 && spec->cap_sync_hook) |