From nobody Wed Dec 17 11:33:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38E1AC4167D for ; Wed, 1 Nov 2023 07:04:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbjKAHEr (ORCPT ); Wed, 1 Nov 2023 03:04:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKAHEq (ORCPT ); Wed, 1 Nov 2023 03:04:46 -0400 Received: from out28-49.mail.aliyun.com (out28-49.mail.aliyun.com [115.124.28.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FCD9E4; Wed, 1 Nov 2023 00:04:41 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1066366|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.00441527-0.000454537-0.99513;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047188;MF=wangweidong.a@awinic.com;NM=1;PH=DS;RN=8;RT=8;SR=0;TI=SMTPD_---.VCY3.ex_1698822275; Received: from ubuntu-VirtualBox..(mailfrom:wangweidong.a@awinic.com fp:SMTPD_---.VCY3.ex_1698822275) by smtp.aliyun-inc.com; Wed, 01 Nov 2023 15:04:37 +0800 From: wangweidong.a@awinic.com To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, wangweidong.a@awinic.com, nathan@kernel.org, inux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: codecs: Modify the wrong judgment of re value Date: Wed, 1 Nov 2023 15:04:12 +0800 Message-ID: <20231101070413.162708-2-wangweidong.a@awinic.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231101070413.162708-1-wangweidong.a@awinic.com> References: <20231101070413.162708-1-wangweidong.a@awinic.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Weidong Wang An error code should be return when the re is greater than the maximum value or less than the minimum value Signed-off-by: Weidong Wang --- sound/soc/codecs/aw88399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c index 47fe38d0def5..936d7d3767f3 100644 --- a/sound/soc/codecs/aw88399.c +++ b/sound/soc/codecs/aw88399.c @@ -486,8 +486,8 @@ static int aw_dev_update_cali_re(struct aw_cali_desc *c= ali_desc) u32 cali_re; int ret; =20 - if ((aw_dev->cali_desc.cali_re <=3D AW88399_CALI_RE_MAX) || - (aw_dev->cali_desc.cali_re >=3D AW88399_CALI_RE_MIN)) + if ((aw_dev->cali_desc.cali_re >=3D AW88399_CALI_RE_MAX) || + (aw_dev->cali_desc.cali_re <=3D AW88399_CALI_RE_MIN)) return -EINVAL; =20 cali_re =3D AW88399_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re + --=20 2.41.0