]> git.baikalelectronics.ru Git - kernel.git/commit
spi/topcliff_pch: Fix potential NULL dereference on allocation error
authorYueHaibing <yuehaibing@huawei.com>
Wed, 23 Jan 2019 12:00:22 +0000 (20:00 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 23 Jan 2019 15:45:37 +0000 (15:45 +0000)
commitb6dc095ea26a05d39f07dc022053cb085f70ddbc
tree91a285cafe9df4664602d2b17680297d839c4216
parent7d49010e23b83474fa4445b083e0b120202e4e87
spi/topcliff_pch: Fix potential NULL dereference on allocation error

In pch_spi_handle_dma, it doesn't check for NULL returns of kcalloc
so it would result in an Oops.

Fixes: c8a70d89ef3d ("spi/topcliff_pch: DMA support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-topcliff-pch.c