Skip to content

Commit a5901f2

Browse files
geoffreybennetttiwai
authored andcommitted
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 <[email protected]> Fixes: 701949c ("ALSA: scarlett2: Add support for reading firmware version") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent fe981e6 commit a5901f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/usb/mixer_scarlett2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4424,6 +4424,8 @@ static int snd_scarlett2_controls_create(
44244424

44254425
/* Add firmware version control */
44264426
err = scarlett2_add_firmware_version_ctl(mixer);
4427+
if (err < 0)
4428+
return err;
44274429

44284430
/* Read volume levels and controls from the interface */
44294431
err = scarlett2_read_configs(mixer);

0 commit comments

Comments
 (0)