static
DECLARE_TLV_DB_SCALE(juli_master_db_scale, -6350, 50, 1);
-static void add_followers(struct snd_card *card,
- struct snd_kcontrol *master,
- const char * const *list)
-{
- for (; *list; list++) {
- struct snd_kcontrol *follower =
- snd_ctl_find_id_mixer(card, *list);
- /* dev_dbg(card->dev, "add_followers - %s\n", *list); */
- if (follower) {
- /* dev_dbg(card->dev, "follower %s found\n", *list); */
- snd_ctl_add_follower(master, follower);
- }
- }
-}
-
static int juli_add_controls(struct snd_ice1712 *ice)
{
struct juli_spec *spec = ice->spec;
juli_master_db_scale);
if (!vmaster)
return -ENOMEM;
- add_followers(ice->card, vmaster, follower_vols);
err = snd_ctl_add(ice->card, vmaster);
+ if (err < 0)
+ return err;
+ err = snd_ctl_add_followers(ice->card, vmaster, follower_vols);
if (err < 0)
return err;
static
DECLARE_TLV_DB_SCALE(qtet_master_db_scale, -6350, 50, 1);
-static void add_followers(struct snd_card *card,
- struct snd_kcontrol *master, const char * const *list)
-{
- for (; *list; list++) {
- struct snd_kcontrol *follower =
- snd_ctl_find_id_mixer(card, *list);
- if (follower)
- snd_ctl_add_follower(master, follower);
- }
-}
-
static int qtet_add_controls(struct snd_ice1712 *ice)
{
struct qtet_spec *spec = ice->spec;
qtet_master_db_scale);
if (!vmaster)
return -ENOMEM;
- add_followers(ice->card, vmaster, follower_vols);
err = snd_ctl_add(ice->card, vmaster);
+ if (err < 0)
+ return err;
+ err = snd_ctl_add_followers(ice->card, vmaster, follower_vols);
if (err < 0)
return err;
/* only capture SPDIF over AK4113 */