Commit baf46c3c authored by Weidong Wang's avatar Weidong Wang Committed by Mark Brown

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: default avatarWeidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20231101090211.177125-3-wangweidong.a@awinic.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c9e920ff
......@@ -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 +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment