aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-13 08:23:29 -0400
committerMark Brown <broonie@kernel.org>2015-04-15 12:04:15 -0400
commit96f05be37f4ece1dffba92d4ae079a486a4cf6df (patch)
tree96a01feb916b411df2cc43600dec625f907b0b7f /sound
parent7667428f80526d908124e0647ac5dbe3dad88900 (diff)
ASoC: qcom: Return an error for invalid PCM trigger command
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/qcom/lpass-cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 6698d058de29..dc790abaa331 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -194,7 +194,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
194 int cmd, struct snd_soc_dai *dai) 194 int cmd, struct snd_soc_dai *dai)
195{ 195{
196 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); 196 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
197 int ret; 197 int ret = -EINVAL;
198 198
199 switch (cmd) { 199 switch (cmd) {
200 case SNDRV_PCM_TRIGGER_START: 200 case SNDRV_PCM_TRIGGER_START: