PCI: xilinx: Check for __get_free_pages() failure
authorKangjie Lu <kjlu@umn.edu>
Mon, 25 Mar 2019 22:19:09 +0000 (17:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:17:17 +0000 (08:17 +0200)
commitd73c419cc5c528df713f91a802c8ead538563e1b
tree8f891b0fefd5b8aafa1fd97761e0fd538c53447c
parent9cc334c336c839e1a22ecfbd4e0a9463a5cb0f83
PCI: xilinx: Check for __get_free_pages() failure

[ Upstream commit 699ca30162686bf305cdf94861be02eb0cf9bda2 ]

If __get_free_pages() fails, return -ENOMEM to avoid a NULL pointer
dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/host/pcie-xilinx.c