Skip to contentSkip to conversation

ALSA: scarlett2: Add missing check with firmware version control

PATCH Applied Geoffrey D. Bennett 2 participants 2 messages Oct 27, 2023

Subsystems (2)
lore
Share & tools
lore

Geoffrey D. Bennett

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 sound/usb/mixer_scarlett2.c | 2 ++
 1 file changed, 2 insertions(+)
sound/usb/mixer_scarlett2.c +2 -0
index f6d1fdfa88e1..9803f3e426c6 100644
@@ -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);
Signature · 1 line
2.41.0
Applied
#1 lore raw
Quoted 5 lines · Geoffrey D. Bennett

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

Thanks, applied with Fixes tag.

Takashi