Skip to contentSkip to conversation

ALSA: usb-audio: Fix a missing error check in scarlett gen2 mixer

PATCH New Takashi Iwai 1 participant 1 message Sep 29, 2021 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio: Fix a missing error check in scarlett gen2 mixer

The check of the returned error code is missing in scarlett2_update_monitor_other(). Let's fix it.

Fixes d5bda7e03982 ("ALSA: usb-audio: scarlett2: Add support for the talkback feature")
---
 sound/usb/mixer_scarlett_gen2.c | 2 ++
 1 file changed, 2 insertions(+)
sound/usb/mixer_scarlett_gen2.c +2 -0
index 3d5848d5481b..53ebabf42472 100644
@@ -2450,6 +2450,8 @@ static int scarlett2_update_monitor_other(struct usb_mixer_interface *mixer)
 		err = scarlett2_usb_get_config(mixer,
 					       SCARLETT2_CONFIG_TALKBACK_MAP,
 					       1, &bitmap);
+		if (err < 0)
+			return err;
 		for (i = 0; i < num_mixes; i++, bitmap >>= 1)
 			private->talkback_map[i] = bitmap & 1;
 	}
Signature · 1 line
2.26.2