diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-09-29 10:35:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-20 12:57:45 +0300 |
commit | dfd5633ae7755809be1fee84cc250684f133df93 (patch) | |
tree | 1fc48c883bad69113a822f4b6a5322c20770ea22 /sound/usb | |
parent | 1a98c3c687956a9a239286e7b98389f8e8f8961b (diff) | |
download | linux-dfd5633ae7755809be1fee84cc250684f133df93.tar.xz |
ALSA: usb-audio: Fix a missing error check in scarlett gen2 mixer
commit 8ec59ac3ad29891c0afef627640df36f2daa0349 upstream.
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")
Reported-by: kernel test robot <lkp@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/202109131831.9IodEzRx-lkp@intel.com
Link: https://lore.kernel.org/r/20210929073540.9611-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer_scarlett_gen2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c index 3d5848d5481b..53ebabf42472 100644 --- a/sound/usb/mixer_scarlett_gen2.c +++ b/sound/usb/mixer_scarlett_gen2.c @@ -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; } |