Skip to content

Commit 070e6bf

Browse files
committed
volume: fix range check for max channels
Fix the check for maximum number of channels to be in the correct range. Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
1 parent 7a2f8c2 commit 070e6bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/audio/volume.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static int volume_ctrl_get_cmd(struct comp_dev *dev,
350350
int j;
351351

352352
/* validate */
353-
if (cdata->num_elems == 0 || cdata->num_elems >= SOF_IPC_MAX_CHANNELS) {
353+
if (cdata->num_elems == 0 || cdata->num_elems > SOF_IPC_MAX_CHANNELS) {
354354
trace_volume_error("gc0");
355355
tracev_value(cdata->num_elems);
356356
return -EINVAL;

0 commit comments

Comments
 (0)