diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-02-13 11:36:07 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-03-05 10:33:28 +1100 |
commit | c75d5bc2fce826ec742f79fd235d6839b900fdb9 (patch) | |
tree | cb0804ff47a2da07651d39fa9b02593d93db59d1 /configfs.c | |
parent | 0f3bc623dd2dee19be430db00e7f9cbbf922e117 (diff) |
Ensure number of channels in configfs is greater than 0
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'configfs.c')
-rw-r--r-- | configfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -79,7 +79,7 @@ static ssize_t cfg_snd_avirt_stream_channels_store(struct config_item *item, if (err < 0) return err; - if (tmp > INT_MAX) + if ((tmp > INT_MAX) || (tmp == 0)) return -ERANGE; stream->channels = tmp; |