projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9e920f
)
ASoC: codecs: Modify the wrong judgment of re value
author
Weidong Wang
<wangweidong.a@awinic.com>
Wed, 1 Nov 2023 09:02:09 +0000
(17:02 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 1 Nov 2023 13:19:42 +0000
(13:19 +0000)
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>
sound/soc/codecs/aw88399.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/aw88399.c
b/sound/soc/codecs/aw88399.c
index 1d6228cb1cc269138cca0ea301e4916fb1727d5b..54f8457e8497043425437efbd153503778714afe 100644
(file)
--- 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 +