Volume: delete invalid check

The ch < 0 check is invalid since the channel type being
passed is unsiged.

Signed-off-by: Curtis Malainey <curtis@malainey.com>
This commit is contained in:
Curtis Malainey 2021-08-10 08:04:10 -06:00 committed by Liam Girdwood
parent cd1bb03a5a
commit 9edfcfc036
1 changed files with 4 additions and 3 deletions

View File

@ -550,7 +550,7 @@ static int volume_ctrl_set_cmd(struct comp_dev *dev,
{
struct vol_data *cd = comp_get_drvdata(dev);
uint32_t val;
int ch;
uint32_t ch;
int j;
int ret = 0;
@ -569,7 +569,8 @@ static int volume_ctrl_set_cmd(struct comp_dev *dev,
val = cdata->chanv[j].value;
comp_info(dev, "volume_ctrl_set_cmd(), channel = %d, value = %u",
ch, val);
if (ch < 0 || ch >= SOF_IPC_MAX_CHANNELS) {
if (ch >= SOF_IPC_MAX_CHANNELS) {
comp_err(dev, "volume_ctrl_set_cmd(), illegal channel = %d",
ch);
return -EINVAL;
@ -598,7 +599,7 @@ static int volume_ctrl_set_cmd(struct comp_dev *dev,
val = cdata->chanv[j].value;
comp_info(dev, "volume_ctrl_set_cmd(), channel = %d, value = %u",
ch, val);
if (ch < 0 || ch >= SOF_IPC_MAX_CHANNELS) {
if (ch >= SOF_IPC_MAX_CHANNELS) {
comp_err(dev, "volume_ctrl_set_cmd(), illegal channel = %d",
ch);
return -EINVAL;