aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-08-17 09:46:27 +0200
committerTakashi Iwai <tiwai@suse.de>2021-08-17 09:46:27 +0200
commitc0a7f9372cf0fc9bd0a73eb287664e26e5b18f1e (patch)
treec9c7b7b048b1d0e59917144d6769a08282ebca8b /sound/pci/hda/hda_generic.c
parentALSA: hda: Nuke unused reboot_notify callback (diff)
parentALSA: hda/via: Apply runtime PM workaround for ASUS B23E (diff)
downloadwireguard-linux-c0a7f9372cf0fc9bd0a73eb287664e26e5b18f1e.tar.xz
wireguard-linux-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.c10
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)