summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-07-27 11:05:47 +0900
committerMark Brown <broonie@kernel.org>2021-07-27 13:14:47 +0100
commit7931df9bf07bfe62831e559e5ffdca6f3657d92c (patch)
tree24e81e0dca19ffbf8c4f5bdf5e00bf200647ca0d /sound/soc/soc-pcm.c
parent940a1f43572316ba3320fea361db2a5200e2de0e (diff)
downloadlinux-7931df9bf07bfe62831e559e5ffdca6f3657d92c.tar.bz2
ASoC: soc-pcm: cleanup cppcheck warning at dpcm_be_is_active()
This patch cleanups below cppcheck warning. sound/soc/soc-pcm.c:1305:30: style: The scope of the variable 'widget' can be reduced. [variableScope] struct snd_soc_dapm_widget *widget; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pmv4zf2c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 1122bb8cdfc6..04c1c0aec9b0 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1307,13 +1307,12 @@ void dpcm_path_put(struct snd_soc_dapm_widget_list **list)
static bool dpcm_be_is_active(struct snd_soc_dpcm *dpcm, int stream,
struct snd_soc_dapm_widget_list *list)
{
- struct snd_soc_dapm_widget *widget;
struct snd_soc_dai *dai;
unsigned int i;
/* is there a valid DAI widget for this BE */
for_each_rtd_dais(dpcm->be, i, dai) {
- widget = snd_soc_dai_get_widget(dai, stream);
+ struct snd_soc_dapm_widget *widget = snd_soc_dai_get_widget(dai, stream);
/*
* The BE is pruned only if none of the dai