Skip to content

Commit

Permalink
ALSA: usb-audio: Fix a missing error check in scarlett gen2 mixer
Browse files Browse the repository at this point in the history
The check of the returned error code is missing in
scarlett2_update_monitor_other().  Let's fix it.

Fixes: d5bda7e ("ALSA: usb-audio: scarlett2: Add support for the talkback feature")
Reported-by: kernel test robot <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Sep 30, 2021
1 parent f2ff714 commit 8ec59ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/usb/mixer_scarlett_gen2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8ec59ac

Please sign in to comment.