summaryrefslogtreecommitdiff
path: root/sound/usb
diff options
context:
space:
mode:
authorGeoffrey D. Bennett <g@b4.vu>2023-10-27 20:31:21 +1030
committerTakashi Iwai <tiwai@suse.de>2023-10-27 12:33:11 +0200
commita5901f27dcf13203e5b342b7e9439314a775bf32 (patch)
treeb1035677176775ba6977c83c01f63fabb95c14ee /sound/usb
parentfe981e67568c41de6caae25d70b5f203b94452cc (diff)
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: 701949cc0128 ("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>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer_scarlett2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index 462a66d485c8..f7c57a2c3028 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -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);