summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorZhu Jun <zhujun2@cmss.chinamobile.com>2024-10-09 02:23:05 -0700
committerTakashi Iwai <tiwai@suse.de>2024-10-11 11:17:14 +0200
commitfd5f14c126a65f27ada3f192b982c6797cc302c7 (patch)
tree8cfd777fb7a073b9509b9c8bed7f734ca0336bb3 /sound
parentc9bd4a82b4ed32c6d1c90500a52063e6e341517f (diff)
ALSA: scarlett2: Add error check after retrieving PEQ filter values
Add error check after retrieving PEQ filter values in scarlett2_update_filter_values that ensure function returns error if PEQ filter value retrieval fails. Fixes: b64678eb4e70 ("ALSA: scarlett2: Add DSP controls") Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20241009092305.8570-1-zhujun2@cmss.chinamobile.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/mixer_scarlett2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index 1150cf104985..4cddf84db631 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -5613,6 +5613,8 @@ static int scarlett2_update_filter_values(struct usb_mixer_interface *mixer)
info->peq_flt_total_count *
SCARLETT2_BIQUAD_COEFFS,
peq_flt_values);
+ if (err < 0)
+ return err;
for (i = 0, dst_idx = 0; i < info->dsp_input_count; i++) {
src_idx = i *