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>
This commit is contained in:
Baolin Wang 2019-04-03 00:47:55 -07:00 committed by Mark Brown
parent d82e78b0a5
commit adcc9f2b06
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 2 deletions

View File

@ -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)