Skip to content

Commit

Permalink
ALSA: scarlett2: Add missing check with firmware version control
Browse files Browse the repository at this point in the history
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 <g@b4.vu>
  • Loading branch information
geoffreybennett committed Nov 13, 2023
1 parent 2b17abb commit 81baf53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/usb/mixer_scarlett2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 81baf53

Please sign in to comment.