diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-22 14:12:11 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-12 16:54:17 -0500 |
commit | 6c8b12080e9775d13dd99a4cd3d9e79448bf93f7 (patch) | |
tree | e4e5cce60e0e372793d665deb23f0e93c19b5e2d /drivers/pci/host/pcie-altera-msi.c | |
parent | ce4f1c7ad490aa7129bde5632d6e53943f8a866c (diff) |
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: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host/pcie-altera-msi.c')
-rw-r--r-- | drivers/pci/host/pcie-altera-msi.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c index 99177f4ccde2..0629ae172b55 100644 --- a/drivers/pci/host/pcie-altera-msi.c +++ b/drivers/pci/host/pcie-altera-msi.c @@ -237,11 +237,6 @@ static int altera_msi_probe(struct platform_device *pdev) msi->pdev = pdev; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "csr"); - if (!res) { - dev_err(&pdev->dev, "no csr memory resource defined\n"); - return -ENODEV; - } - msi->csr_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(msi->csr_base)) { dev_err(&pdev->dev, "failed to map csr memory\n"); @@ -250,11 +245,6 @@ static int altera_msi_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vector_slave"); - if (!res) { - dev_err(&pdev->dev, "no vector_slave memory resource defined\n"); - return -ENODEV; - } - msi->vector_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(msi->vector_base)) { dev_err(&pdev->dev, "failed to map vector_slave memory\n"); |