summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorWeidong Wang <wangweidong.a@awinic.com>2023-11-01 12:02:09 +0300
committerMark Brown <broonie@kernel.org>2023-11-01 16:19:42 +0300
commitbaf46c3c763809fbeabcff5ec6e2ff3081f755f2 (patch)
treea4a8bc64854df016509efad475567a885b0dcaed /sound
parentc9e920ffa752b9047d65041cd70495409c768dd7 (diff)
downloadlinux-baf46c3c763809fbeabcff5ec6e2ff3081f755f2.tar.xz
ASoC: codecs: Modify the wrong judgment of re value
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> Link: https://lore.kernel.org/r/20231101090211.177125-3-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/aw88399.c4
1 files 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 +