Skip to content

Commit

Permalink
ASoC: SOF: fix range check for max channels
Browse files Browse the repository at this point in the history
Fix the check for maximum number of channels to be in the correct range.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
  • Loading branch information
RanderWang authored and plbossart committed Jul 23, 2018
1 parent 9fc79c4 commit 7c35c5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
struct sof_ipc_ctrl_data *cdata;

/* validate topology data */
if (le32_to_cpu(mc->num_channels) >= SND_SOC_TPLG_MAX_CHAN)
if (le32_to_cpu(mc->num_channels) > SND_SOC_TPLG_MAX_CHAN)
return -EINVAL;

/* init the volume get/put data */
Expand Down

0 comments on commit 7c35c5a

Please sign in to comment.