summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_asrc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-05-21 22:00:33 +0100
committerMark Brown <broonie@kernel.org>2019-05-21 22:00:33 +0100
commita41016e40378d19f7c9ced61856b8bed866e2dda (patch)
treed82aeb3f14ff95791ff165813fee90d3916df0aa /sound/soc/fsl/fsl_asrc.c
parent428306c3b3fe107b1d059ceecf6fda09a1fcedf5 (diff)
parentdf9366131a452296d040a7a496d93108f1fc240c (diff)
Merge branch 'for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.3
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.c')
-rw-r--r--sound/soc/fsl/fsl_asrc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 71793d3dc75c..a8d6710f2541 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -311,8 +311,8 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair)
return -EINVAL;
}
- if ((outrate > 8000 && outrate < 30000) &&
- (outrate/inrate > 24 || inrate/outrate > 8)) {
+ if ((outrate >= 8000 && outrate <= 30000) &&
+ (outrate > 24 * inrate || inrate > 8 * outrate)) {
pair_err("exceed supported ratio range [1/24, 8] for \
inrate/outrate: %d/%d\n", inrate, outrate);
return -EINVAL;