From: Fabio Estevam <festevam@gmail.com>
To: bhelgaas@google.com
Cc: dhdang@apm.com, linux-pci@vger.kernel.org,
Fabio Estevam <festevam@gmail.com>
Subject: [PATCH] PCI: xgene: Fix the error return code
Date: Tue, 19 Dec 2017 22:38:29 -0200 [thread overview]
Message-ID: <1513730309-18831-1-git-send-email-festevam@gmail.com> (raw)
In the case of IS_ERR() error, we should return PTR_ERR().
Fix the error return code.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/pci/host/pci-xgene-msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
index 1f42a20..4a1fb01 100644
--- a/drivers/pci/host/pci-xgene-msi.c
+++ b/drivers/pci/host/pci-xgene-msi.c
@@ -465,7 +465,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;
--
2.7.4
next reply other threads:[~2017-12-20 0:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 0:38 Fabio Estevam [this message]
2017-12-20 12:14 ` [PATCH] PCI: xgene: Fix the error return code Lorenzo Pieralisi
2018-02-14 1:45 ` Fabio Estevam
2018-02-14 15:32 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513730309-18831-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=bhelgaas@google.com \
--cc=dhdang@apm.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox