提交 fd4fb262 编写于 作者: P Prasad Joshi 提交者: Mark Brown

ASoC: spear: correct the check for NULL dma_buffer pointer

The if condition
	if (!buf && !buf->area)

checks if the buf pointer is NULL and then dereferences it again to
check if the buffer area is NULL, resulting in possible NULL
dereference.
Signed-off-by: NPrasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 c9219286
......@@ -138,7 +138,7 @@ static void spear_pcm_free(struct snd_pcm *pcm)
continue;
buf = &substream->dma_buffer;
if (!buf && !buf->area)
if (!buf || !buf->area)
continue;
dma_free_writecombine(pcm->card->dev, buf->bytes,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册