aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-component.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-08-16 13:56:19 +0900
committerMark Brown <broonie@kernel.org>2021-08-16 13:29:35 +0100
commit500b39da62499721ffd287994322a36440d1bb9c (patch)
tree07a971530fddd78eff3b9061dbb9e788290b6baa /sound/soc/soc-component.c
parentASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB (diff)
downloadwireguard-linux-500b39da62499721ffd287994322a36440d1bb9c.tar.xz
wireguard-linux-500b39da62499721ffd287994322a36440d1bb9c.zip
ASoC: soc-component: cleanup cppcheck warning at snd_soc_pcm_component_pm_runtime_get()
This patch cleanups below cppcheck warning. sound/soc/soc-component.c:1183:9: style: The scope of the variable 'ret' can be reduced. [variableScope] int i, ret; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sfzayolo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r--sound/soc/soc-component.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index c8dfd0de30e4..8e8d917d22f8 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1171,10 +1171,10 @@ int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd,
void *stream)
{
struct snd_soc_component *component;
- int i, ret;
+ int i;
for_each_rtd_components(rtd, i, component) {
- ret = pm_runtime_get_sync(component->dev);
+ int ret = pm_runtime_get_sync(component->dev);
if (ret < 0 && ret != -EACCES) {
pm_runtime_put_noidle(component->dev);
return soc_component_ret(component, ret);