From: Kuninori Morimoto Date: Mon, 16 Aug 2021 04:55:44 +0000 (+0900) Subject: ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_hw_params() X-Git-Tag: accepted/tizen/unified/20230118.172025~6151^2~1^2~69^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a1e5ac50de2185d6e50b0d09fbed3ef06950d90;p=platform%2Fkernel%2Flinux-rpi.git 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: Kuninori Morimoto Link: https://lore.kernel.org/r/8735ra0yzz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 9ef80a4..9949db4 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -79,7 +79,6 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config); struct dma_slave_config slave_config; - int ret; memset(&slave_config, 0, sizeof(slave_config)); @@ -89,7 +88,7 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component, prepare_slave_config = pcm->config->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) return ret;