]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: spear: correct the check for NULL dma_buffer pointer
authorPrasad Joshi <prasadjoshi.linux@gmail.com>
Fri, 31 Aug 2012 03:25:21 +0000 (08:55 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 31 Aug 2012 21:24:52 +0000 (14:24 -0700)
commit2cbfbb5733905ef76189ec2dad3e1c0dd93ae8c2
tree1649a8e8ab2e7fb5ac43f8ebcfe04e732cae9d42
parentf0f3c6f11bc664ab543b72180eb79ddd582dc71f
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: Prasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/spear/spear_pcm.c