mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-21 12:36:21 -04:00
ALSA: scarlett2: Add missing error check when initialise Autogain Status
When initialise new control with scarlett2_add_new_ctl() function for
Autogain Status, scarlett2_add_new_ctl() might throw an error. So, add
error check after initialise new control for Autogain Status.
This is reported by Coverity Scan with CID 1598781 as UNUSED_VALUE.
Fixes: 0a995e38dc ("ALSA: scarlett2: Add support for software-controllable input gain")
Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
Link: https://patch.msgid.link/20260508033914.111596-1-robertusdchris@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
fca7401fe3
commit
c0e4fffc0f
@@ -6707,6 +6707,8 @@ static int scarlett2_add_line_in_ctls(struct usb_mixer_interface *mixer)
|
||||
err = scarlett2_add_new_ctl(
|
||||
mixer, &scarlett2_autogain_status_ctl,
|
||||
i, 1, s, &private->autogain_status_ctls[i]);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Add autogain target controls */
|
||||
|
||||
Reference in New Issue
Block a user