From adcc9f2b064e60f569979fb1de1f158e8bed8a6d Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Wed, 3 Apr 2019 00:47:55 -0700 Subject: 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 Signed-off-by: Baolin Wang Signed-off-by: Mark Brown --- sound/soc/sprd/sprd-pcm-compress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sound/soc/sprd') 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) -- cgit v1.2.3