Skip to content

Commit

Permalink
ASoC: qcom: Return an error for invalid PCM trigger command
Browse files Browse the repository at this point in the history
Fix a compile warning
  sound/soc/qcom/lpass-cpu.c: In function ‘lpass_cpu_daiops_trigger’:
  sound/soc/qcom/lpass-cpu.c:224:2: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    return ret;
      ^
Although switch () lists the most of existing cases, it's still better
to cover the rest as an error properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Takashi Iwai authored and Mark Brown committed Apr 15, 2015
1 parent 7667428 commit 96f05be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/qcom/lpass-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
int ret;
int ret = -EINVAL;

switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
Expand Down

0 comments on commit 96f05be

Please sign in to comment.