Skip to contentSkip to conversation

sound: ppc: snd_ps3: Remove Unneeded variable: "ret"

PATCH In review Hariprasad Kelam 2 participants 2 messages Jul 10, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound: ppc: snd_ps3: Remove Unneeded variable: "ret"

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

---
 sound/ppc/snd_ps3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/ppc/snd_ps3.c +1 -2
index 71b7fd3..c213eb7 100644
@@ -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;
 };
 
 /*
Signature · 1 line
2.7.4
#1 lore raw
Quoted 9 lines · Hariprasad Kelam

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

Applied (with the correction of the description again).

thanks,

Takashi