Skip to content

Commit baf46c3

Browse files
wangweidongabroonie
authored andcommitted
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>
1 parent c9e920f commit baf46c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/aw88399.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ static int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc)
486486
u32 cali_re;
487487
int ret;
488488

489-
if ((aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MAX) ||
490-
(aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MIN))
489+
if ((aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MAX) ||
490+
(aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MIN))
491491
return -EINVAL;
492492

493493
cali_re = AW88399_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re +

0 commit comments

Comments
 (0)