Commit dbeb4bd8 authored by Bjorn Helgaas's avatar Bjorn Helgaas

PCI: altera: Remove redundant platform_get_resource() return value check

devm_ioremap_resource() fails gracefully when given a NULL resource
pointer, so we don't need to check separately for failure from
platform_get_resource_byname().  Remove the redundant check.
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent ee34264e
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
struct altera_pcie { struct altera_pcie {
struct platform_device *pdev; struct platform_device *pdev;
void __iomem *cra_base; void __iomem *cra_base; /* DT Cra */
int irq; int irq;
u8 root_bus_nr; u8 root_bus_nr;
struct irq_domain *irq_domain; struct irq_domain *irq_domain;
...@@ -555,11 +555,6 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie) ...@@ -555,11 +555,6 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)
struct resource *cra; struct resource *cra;
cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra"); cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra");
if (!cra) {
dev_err(dev, "no Cra memory resource defined\n");
return -ENODEV;
}
pcie->cra_base = devm_ioremap_resource(dev, cra); pcie->cra_base = devm_ioremap_resource(dev, cra);
if (IS_ERR(pcie->cra_base)) { if (IS_ERR(pcie->cra_base)) {
dev_err(dev, "failed to map cra memory\n"); dev_err(dev, "failed to map cra memory\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment