summaryrefslogtreecommitdiff
path: root/sound/soc/sprd/sprd-pcm-compress.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-04-03 10:47:55 +0300
committerMark Brown <broonie@kernel.org>2019-04-04 08:51:16 +0300
commitadcc9f2b064e60f569979fb1de1f158e8bed8a6d (patch)
tree1566185c81ad338e2429a57c67831a3790338fe4 /sound/soc/sprd/sprd-pcm-compress.c
parentd82e78b0a578a712629cdb6cb7bfc66fb3215306 (diff)
downloadlinux-adcc9f2b064e60f569979fb1de1f158e8bed8a6d.tar.xz
ASoC: sprd: Fix the smatch warning
Remove the unnecessary validation of the 'cstream' variable to fix below smatch warning: sprd_platform_compr_drain_notify() warn: variable dereferenced before check 'cstream' (see line 105) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sprd/sprd-pcm-compress.c')
-rw-r--r--sound/soc/sprd/sprd-pcm-compress.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c
index dc84257cffc2..424e9834d093 100644
--- a/sound/soc/sprd/sprd-pcm-compress.c
+++ b/sound/soc/sprd/sprd-pcm-compress.c
@@ -107,8 +107,7 @@ static void sprd_platform_compr_drain_notify(void *arg)
memset(stream->info_area, 0, sizeof(struct sprd_compr_playinfo));
- if (cstream)
- snd_compr_drain_notify(cstream);
+ snd_compr_drain_notify(cstream);
}
static void sprd_platform_compr_dma_complete(void *data)