summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/configfs.c b/configfs.c
index a22c75f..4792f87 100644
--- a/configfs.c
+++ b/configfs.c
@@ -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;