From: wangweidong.a@awinic.com
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, wangweidong.a@awinic.com, liweilei@awinic.com,
u.kleine-koenig@pengutronix.de, yang.lee@linux.alibaba.com,
nathan@kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH V2 2/3] ASoC: codecs: Modify the wrong judgment of re value
Date: Wed, 1 Nov 2023 17:02:09 +0800 [thread overview]
Message-ID: <20231101090211.177125-3-wangweidong.a@awinic.com> (raw)
In-Reply-To: <20231101090211.177125-1-wangweidong.a@awinic.com>
From: Weidong Wang <wangweidong.a@awinic.com>
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 <wangweidong.a@awinic.com>
---
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 1d6228cb1cc2..54f8457e8497 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 *cali_desc)
u32 cali_re;
int ret;
- if ((aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MAX) ||
- (aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MIN))
+ if ((aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MAX) ||
+ (aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MIN))
return -EINVAL;
cali_re = AW88399_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re +
--
2.41.0
next prev parent reply other threads:[~2023-11-01 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 9:02 [PATCH V2 0/3] ASoC: codecs: Modify some error codes wangweidong.a
2023-11-01 9:02 ` [PATCH V2 1/3] ASoC: codecs: Modify the maximum value of calib wangweidong.a
2023-11-01 9:02 ` wangweidong.a [this message]
2023-11-01 9:02 ` [PATCH V2 3/3] ASoC: codecs: Modify macro value error wangweidong.a
2023-11-02 14:26 ` [PATCH V2 0/3] ASoC: codecs: Modify some error codes Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231101090211.177125-3-wangweidong.a@awinic.com \
--to=wangweidong.a@awinic.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=liweilei@awinic.com \
--cc=nathan@kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yang.lee@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®