[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241009092305.8570-1-zhujun2@cmss.chinamobile.com>
Date: Wed, 9 Oct 2024 02:23:05 -0700
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: perex@...ex.cz
Cc: tiwai@...e.com,
g@...vu,
linux-sound@...r.kernel.org,
zhujun2@...s.chinamobile.com,
linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: [PATCH v2] 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.
Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
Cc: <stable@...r.kernel.org>
---
V1 -> V2:
- commit wit a dot
- add tag "Cc"
- delete a blank before the return value check
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 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 *
--
2.17.1
Powered by blists - more mailing lists