diff mbox series

[7/8] ASoC: sh: siu_pcm: remove useless assignment

Message ID 20210219231635.5749-8-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit eeff1df1fa13126f6024eb6dd0075b3182a3e011
Headers show
Series ASoC: sh: remove cppcheck warnings | expand

Commit Message

Pierre-Louis Bossart Feb. 19, 2021, 11:16 p.m. UTC
cppcheck warning:

sound/soc/sh/siu_pcm.c:375:5: style: Redundant initialization for
'rt'. The initialized value is overwritten before it is
read. [redundantInitialization]

 rt = siu_stream->substream->runtime;
    ^
sound/soc/sh/siu_pcm.c:366:30: note: rt is initialized
 struct snd_pcm_runtime  *rt = ss->runtime;
                             ^
sound/soc/sh/siu_pcm.c:375:5: note: rt is overwritten
 rt = siu_stream->substream->runtime;
    ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sh/siu_pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 4785886df4f0..6496300f73a9 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -363,7 +363,7 @@  static int siu_pcm_prepare(struct snd_soc_component *component,
 	struct siu_info *info = siu_i2s_data;
 	struct siu_port *port_info = siu_port_info(ss);
 	struct device *dev = ss->pcm->card->dev;
-	struct snd_pcm_runtime 	*rt = ss->runtime;
+	struct snd_pcm_runtime *rt;
 	struct siu_stream *siu_stream;
 	snd_pcm_sframes_t xfer_cnt;