aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-01-07 12:18:14 +0000
committerMark Brown <broonie@kernel.org>2019-01-07 12:18:14 +0000
commitaa07e38b0ae9338e34cf2b8df2259ff6ff6e843f (patch)
treec8de6e63527eb567f223392e0620c96ad737fb51 /sound/core
parentLinux 5.0-rc1 (diff)
parentASoC: ti: davinci-mcasp: Add support for GPIO mode of the pins (diff)
downloadlinux-dev-aa07e38b0ae9338e34cf2b8df2259ff6ff6e843f.tar.xz
linux-dev-aa07e38b0ae9338e34cf2b8df2259ff6ff6e843f.zip
Merge branch 'asoc-4.22' into asoc-5.0
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index a5b09e75e787..f7d2b373da0a 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -541,7 +541,8 @@ static int snd_compress_check_input(struct snd_compr_params *params)
{
/* first let's check the buffer parameter's */
if (params->buffer.fragment_size == 0 ||
- params->buffer.fragments > INT_MAX / params->buffer.fragment_size)
+ params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
+ params->buffer.fragments == 0)
return -EINVAL;
/* now codec parameters */