[PATCH] 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 g@b4.vu --- sound/usb/mixer_scarlett2.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index f6d1fdfa88e1..9803f3e426c6 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -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);
On Fri, 27 Oct 2023 12:01:21 +0200, Geoffrey D. Bennett wrote:
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
Thanks, applied with Fixes tag.
Takashi
participants (2)
-
Geoffrey D. Bennett
-
Takashi Iwai