summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/lpass-platform.c
diff options
context:
space:
mode:
authorColin Ian King2017-09-18 11:26:03 +0200
committerMark Brown2017-09-19 13:57:06 +0200
commit20cf7e3ce3083593e163849ae6ba95525f2366ca (patch)
tree07937c467a2043a264af6d25bdf1e9db106384da /sound/soc/qcom/lpass-platform.c
parentLinux 4.14-rc1 (diff)
downloadkernel-qcow2-linux-20cf7e3ce3083593e163849ae6ba95525f2366ca.tar.gz
kernel-qcow2-linux-20cf7e3ce3083593e163849ae6ba95525f2366ca.tar.xz
kernel-qcow2-linux-20cf7e3ce3083593e163849ae6ba95525f2366ca.zip
ASoC: qcom: remove duplicate initializations of dma_ch and v
dma_ch is being initialized to zero and then immediately afterwards being updated again, so the first initialization is redundant and can be remove. Likewise, the pointer v is being initialized twice, so remove the second duplicate initialization. Cleans up two clang build warnings: warning: Value stored to 'dma_ch' is never read warning: Value stored to 'v' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/lpass-platform.c')
-rw-r--r--sound/soc/qcom/lpass-platform.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index e1945e1772cd..caf71aab8196 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -74,7 +74,6 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream)
data->i2s_port = cpu_dai->driver->id;
runtime->private_data = data;
- dma_ch = 0;
if (v->alloc_dma_channel)
dma_ch = v->alloc_dma_channel(drvdata, dir);
else
@@ -122,7 +121,6 @@ static int lpass_platform_pcmops_close(struct snd_pcm_substream *substream)
struct lpass_pcm_data *data;
data = runtime->private_data;
- v = drvdata->variant;
drvdata->substream[data->dma_ch] = NULL;
if (v->free_dma_channel)
v->free_dma_channel(drvdata, data->dma_ch);