linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound: ppc: snd_ps3: Remove Unneeded variable: "ret"
@ 2019-07-10  2:39 Hariprasad Kelam
  2019-07-10  9:56 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-07-10  2:39 UTC (permalink / raw)
  To: Geoff Levand, Jaroslav Kysela, Takashi Iwai,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, alsa-devel, linux-kernel

This patch fixes below issue reported by coccicheck
sound/ppc/snd_ps3.c:631:5-8: Unneeded variable: "ret". Return "0" on
line 668

We cannot change return type of snd_ps3_pcm_trigger as it is registered
with snd_pcm_ops->trigger

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 sound/ppc/snd_ps3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index 71b7fd3..c213eb7 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -628,7 +628,6 @@ static int snd_ps3_pcm_trigger(struct snd_pcm_substream *substream,
 			       int cmd)
 {
 	struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream);
-	int ret = 0;
 
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
@@ -665,7 +664,7 @@ static int snd_ps3_pcm_trigger(struct snd_pcm_substream *substream,
 
 	}
 
-	return ret;
+	return 0;
 };
 
 /*
-- 
2.7.4


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

* Re: [PATCH] sound: ppc: snd_ps3: Remove Unneeded variable: "ret"
  2019-07-10  2:39 [PATCH] sound: ppc: snd_ps3: Remove Unneeded variable: "ret" Hariprasad Kelam
@ 2019-07-10  9:56 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-07-10  9:56 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: alsa-devel, Michael Ellerman, Geoff Levand,
	Benjamin Herrenschmidt, linuxppc-dev, Jaroslav Kysela,
	Paul Mackerras, Takashi Iwai, linux-kernel

On Wed, 10 Jul 2019 04:39:46 +0200,
Hariprasad Kelam wrote:
> 
> This patch fixes below issue reported by coccicheck
> sound/ppc/snd_ps3.c:631:5-8: Unneeded variable: "ret". Return "0" on
> line 668
> 
> We cannot change return type of snd_ps3_pcm_trigger as it is registered
> with snd_pcm_ops->trigger
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>

Applied (with the correction of the description again).


thanks,

Takashi

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

end of thread, other threads:[~2019-07-10  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10  2:39 [PATCH] sound: ppc: snd_ps3: Remove Unneeded variable: "ret" Hariprasad Kelam
2019-07-10  9:56 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).