ALSA: ice1712: Use the standard snd_ctl_add_followers() helper
authorTakashi Iwai <tiwai@suse.de>
Fri, 21 Jul 2023 07:16:43 +0000 (09:16 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 21 Jul 2023 07:37:49 +0000 (09:37 +0200)
commit157ac57073bc33396ed719bfdcdccb72798a822d
tree8938bd57d65832a5584895173d35cfb7ae0a0ce3
parentb7bb11fa361f4319b1bbf7cc390ef4dd83236be3
ALSA: ice1712: Use the standard snd_ctl_add_followers() helper

Instead of open-code, use the new standard helper to manage vmaster
stuff for code simplification.

Also, handle the errors from the helper more properly instead of
silently ignoring.

The code changes the call order of snd_ctl_add() of the vmaster object
and its followers for avoiding the possible memory leaks at error
path.  But there should be no difference in the functionality.

Link: https://lore.kernel.org/r/20230721071643.3631-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/juli.c
sound/pci/ice1712/quartet.c