[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201116135023.57321-1-wanghai38@huawei.com>
Date: Mon, 16 Nov 2020 21:50:23 +0800
From: Wang Hai <wanghai38@...wei.com>
To: <jingoohan1@...il.com>, <gustavo.pimentel@...opsys.com>,
<lorenzo.pieralisi@....com>, <robh@...nel.org>,
<bhelgaas@...gle.com>, <Jisheng.Zhang@...aptics.com>
CC: <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] PCI: dwc: fix error return code in dw_pcie_host_init()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Wang Hai <wanghai38@...wei.com>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 44c2a6572199..7b3c91c6ae02 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -395,6 +395,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
if (dma_mapping_error(pci->dev, pp->msi_data)) {
dev_err(pci->dev, "Failed to map MSI data\n");
pp->msi_data = 0;
+ ret = -ENOMEM;
goto err_free_msi;
}
} else {
--
2.17.1
Powered by blists - more mailing lists