]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commite4931affbccc3a4635da49a7a9a29555d4fb44f2
treed8fb87cc3a5c91390ff76a7567193281428dd84c
parent099ac451c3d7a5837c690485a6974dcca4c6388a
spi/topcliff_pch: Fix potential NULL dereference on allocation error

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit e902cdcb5112b89ee445588147964723fd69ffb4 ]

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

Fixes: c37f3c2749b5 ("spi/topcliff_pch: DMA support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/spi/spi-topcliff-pch.c