Skip to content

Commit

Permalink
ASoC: sprd: Fix the smatch warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baolin Wang authored and Mark Brown committed Apr 4, 2019
1 parent d82e78b commit adcc9f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/sprd/sprd-pcm-compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit adcc9f2

Please sign in to comment.