tone: replace switch by if for readability

MISRA C:2012, 16.5: Every switch statement shall have at least two
switch-clauses

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
Pierre-Louis Bossart 2017-09-25 14:52:13 -05:00 committed by Liam Girdwood
parent b513a45e10
commit c3253e1d8f
1 changed files with 2 additions and 6 deletions

View File

@ -484,12 +484,8 @@ static int tone_cmd(struct comp_dev *dev, int cmd, void *data)
if (ret < 0)
return ret;
switch (cmd) {
case COMP_CMD_SET_VALUE:
return tone_ctrl_cmd(dev, cdata);
default:
break;
}
if (cmd == COMP_CMD_SET_VALUE)
ret = tone_ctrl_cmd(dev, cdata);
return ret;
}