ALSA: scarlett2: Add missing check with firmware version control

scarlett2_add_firmware_version_ctl() may return an error, but the
return value was not being checked. Add the missing check.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Fixes: 701949cc01 ("ALSA: scarlett2: Add support for reading firmware version")
Link: https://lore.kernel.org/r/ZTuKcXajVnuelBEb@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Geoffrey D. Bennett 2023-10-27 20:31:21 +10:30 committed by Takashi Iwai
parent fe981e6756
commit a5901f27dc
1 changed files with 2 additions and 0 deletions

View File

@ -4424,6 +4424,8 @@ static int snd_scarlett2_controls_create(
/* Add firmware version control */
err = scarlett2_add_firmware_version_ctl(mixer);
if (err < 0)
return err;
/* Read volume levels and controls from the interface */
err = scarlett2_read_configs(mixer);