Commit 0a1e5ac5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_hw_params()

This patch cleanups below cppcheck warning.

sound/soc/soc-generic-dmaengine-pcm.c:82:6: style: The scope of the variable 'ret' can be reduced. [variableScope]
 int ret;
     ^
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735ra0yzz.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 31e53e13
...@@ -79,7 +79,6 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component, ...@@ -79,7 +79,6 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component,
struct snd_pcm_hw_params *params, struct snd_pcm_hw_params *params,
struct dma_slave_config *slave_config); struct dma_slave_config *slave_config);
struct dma_slave_config slave_config; struct dma_slave_config slave_config;
int ret;
memset(&slave_config, 0, sizeof(slave_config)); memset(&slave_config, 0, sizeof(slave_config));
...@@ -89,7 +88,7 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component, ...@@ -89,7 +88,7 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component,
prepare_slave_config = pcm->config->prepare_slave_config; prepare_slave_config = pcm->config->prepare_slave_config;
if (prepare_slave_config) { if (prepare_slave_config) {
ret = prepare_slave_config(substream, params, &slave_config); int ret = prepare_slave_config(substream, params, &slave_config);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment