summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2017-12-20 01:38:29 +0100
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-02-14 16:24:38 +0100
commit1736353f17e10bee352ec690757c66b568140724 (patch)
treeb8fa6242db974d6f2a3abb349fa5b963882f9279 /drivers/pci
parentLinux 4.16-rc1 (diff)
downloadlinux-1736353f17e10bee352ec690757c66b568140724.tar.xz
linux-1736353f17e10bee352ec690757c66b568140724.zip
PCI: xgene: Fix the xgene_msi_probe() return code
If devm_ioremap_resource() detects an error condition in the return value through IS_ERR(), the return value should be retrieved through PTR_ERR() instead of hardcoding it. Fix the xgene_msi_probe() error return code. Signed-off-by: Fabio Estevam <festevam@gmail.com> [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-xgene-msi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
index df8e4bd5ddb2..f4c02da84e59 100644
--- a/drivers/pci/host/pci-xgene-msi.c
+++ b/drivers/pci/host/pci-xgene-msi.c
@@ -456,7 +456,7 @@ static int xgene_msi_probe(struct platform_device *pdev)
xgene_msi->msi_regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(xgene_msi->msi_regs)) {
dev_err(&pdev->dev, "no reg space\n");
- rc = -EINVAL;
+ rc = PTR_ERR(xgene_msi->msi_regs);
goto error;
}
xgene_msi->msi_addr = res->start;