PCI: dwc: Fix setting error return on MSI DMA mapping failure
authorJiantao Zhang <water.zhangjiantao@huawei.com>
Wed, 9 Mar 2022 12:01:04 +0000 (20:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:21:13 +0000 (10:21 +0200)
commitacd99f384cb303bf8b7bb6fa5884e9fd26b69855
tree43eebd513011f4e7bc3b7816644af25a948d6e57
parent92b7cab3076d0cfbf57c2d8270ff66e7d7c675fe
PCI: dwc: Fix setting error return on MSI DMA mapping failure

[ Upstream commit 88557685cd72cf0db686a4ebff3fad4365cb6071 ]

When dma_mapping_error() returns error because of no enough memory,
but dw_pcie_host_init() returns success, which will mislead the callers.

Link: https://lore.kernel.org/r/30170911-0e2f-98ce-9266-70465b9073e5@huawei.com
Fixes: 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume")
Signed-off-by: Jianrong Zhang <zhangjianrong5@huawei.com>
Signed-off-by: Jiantao Zhang <water.zhangjiantao@huawei.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-designware-host.c