All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: qcom: Return an error for invalid PCM trigger command
@ 2015-04-13 12:23 Takashi Iwai
  2015-04-14 23:31 ` Kenneth Westfield
  2015-04-15 16:04 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Takashi Iwai @ 2015-04-13 12:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: Patrick Lai, Banajit Goswami, Liam Girdwood, alsa-devel

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>
---
 sound/soc/qcom/lpass-cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
 		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:
-- 
2.3.5

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: qcom: Return an error for invalid PCM trigger command
  2015-04-13 12:23 [PATCH] ASoC: qcom: Return an error for invalid PCM trigger command Takashi Iwai
@ 2015-04-14 23:31 ` Kenneth Westfield
  2015-04-15 16:04 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kenneth Westfield @ 2015-04-14 23:31 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Banajit Goswami, Patrick Lai, Mark Brown, Liam Girdwood, alsa-devel

On Mon, Apr 13, 2015 at 02:23:29PM +0200, Takashi Iwai wrote:
> 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>
> ---
>  sound/soc/qcom/lpass-cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>

-- 
Kenneth Westfield
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, 
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: qcom: Return an error for invalid PCM trigger command
  2015-04-13 12:23 [PATCH] ASoC: qcom: Return an error for invalid PCM trigger command Takashi Iwai
  2015-04-14 23:31 ` Kenneth Westfield
@ 2015-04-15 16:04 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-04-15 16:04 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Patrick Lai, Banajit Goswami, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 185 bytes --]

On Mon, Apr 13, 2015 at 02:23:29PM +0200, Takashi Iwai wrote:
> Fix a compile warning
>   sound/soc/qcom/lpass-cpu.c: In function ‘lpass_cpu_daiops_trigger’:

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-15 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 12:23 [PATCH] ASoC: qcom: Return an error for invalid PCM trigger command Takashi Iwai
2015-04-14 23:31 ` Kenneth Westfield
2015-04-15 16:04 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.