From: Wolfram Sang <wsa@the-dreams.de>
To: linux-kernel@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org
Subject: [PATCH 13/27] drivers/pci/host: don't check resource with devm_ioremap_resource
Date: Tue, 23 Jul 2013 20:01:46 +0200 [thread overview]
Message-ID: <1374602524-3398-14-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.
drivers/pci/host/pcie-designware.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 26bdbda..f0ba6ef 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -817,28 +817,16 @@ static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
int ret;
elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!elbi_base) {
- dev_err(&pdev->dev, "couldn't get elbi base resource\n");
- return -EINVAL;
- }
pp->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base);
if (IS_ERR(pp->elbi_base))
return PTR_ERR(pp->elbi_base);
phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (!phy_base) {
- dev_err(&pdev->dev, "couldn't get phy base resource\n");
- return -EINVAL;
- }
pp->phy_base = devm_ioremap_resource(&pdev->dev, phy_base);
if (IS_ERR(pp->phy_base))
return PTR_ERR(pp->phy_base);
purple_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
- if (!purple_base) {
- dev_err(&pdev->dev, "couldn't get purple base resource\n");
- return -EINVAL;
- }
pp->purple_base = devm_ioremap_resource(&pdev->dev, purple_base);
if (IS_ERR(pp->purple_base))
return PTR_ERR(pp->purple_base);
--
1.7.10.4
next parent reply other threads:[~2013-07-23 18:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
2013-07-23 18:01 ` Wolfram Sang [this message]
2013-07-23 18:12 ` [PATCH 13/27] drivers/pci/host: don't check resource with devm_ioremap_resource Bjorn Helgaas
2013-07-23 23:17 ` Jingoo Han
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=1374602524-3398-14-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).