[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <811e491489b62624942dabd56f277b08784ef0f9.1554276741.git.baolin.wang@linaro.org>
Date: Wed, 3 Apr 2019 00:47:55 -0700
From: Baolin Wang <baolin.wang@...aro.org>
To: broonie@...nel.org, lgirdwood@...il.com
Cc: perex@...ex.cz, tiwai@...e.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, baolin.wang@...aro.org,
dan.carpenter@...cle.com
Subject: [PATCH] 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@...cle.com>
Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
sound/soc/sprd/sprd-pcm-compress.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c
index dc84257..424e983 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)
--
1.9.1
Powered by blists - more mailing lists