Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8750940 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Fix invalid function call in snd_hda_add_vmaster()



The recent commit [6194b99d: ALSA: hda - Kill the rest of snd_print*()
usages] changed the callback map_slaves(), but one call was forgotten
to be replaced due to the cast, which leads to kernel Oops due to
invalid function.  This patch replaces it with a proper function.

Fixes: 6194b99d ('ALSA: hda - Kill the rest of snd_print*() usages')
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7e9c2eb6
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -2831,6 +2831,12 @@ static int init_slave_unmute(struct hda_codec *codec,
	return put_kctl_with_value(slave, 1);
	return put_kctl_with_value(slave, 1);
}
}


static int add_slave(struct hda_codec *codec,
		     void *data, struct snd_kcontrol *slave)
{
	return snd_ctl_add_slave(data, slave);
}

/**
/**
 * snd_hda_add_vmaster - create a virtual master control and add slaves
 * snd_hda_add_vmaster - create a virtual master control and add slaves
 * @codec: HD-audio codec
 * @codec: HD-audio codec
@@ -2873,8 +2879,7 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,
	if (err < 0)
	if (err < 0)
		return err;
		return err;


	err = map_slaves(codec, slaves, suffix,
	err = map_slaves(codec, slaves, suffix, add_slave, kctl);
			 (map_slave_func_t)snd_ctl_add_slave, kctl);
	if (err < 0)
	if (err < 0)
		return err;
		return err;