diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-28 16:14:54 (GMT) |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-23 21:55:18 (GMT) |
commit | 639c5323257f940a8627e86c982f6b93e9e2615c (patch) | |
tree | 5cd56b2270d3ae985b4bf43e8ab7d0fa31741a48 | |
parent | 68a0bfec72cb4f117198ae31df114dad4c5e405d (diff) | |
download | linux-639c5323257f940a8627e86c982f6b93e9e2615c.tar.xz |
PCI: designware: 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.
[bhelgaas: changelog]
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/host/pcie-designware-plat.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/pci/host/pcie-designware-plat.c b/drivers/pci/host/pcie-designware-plat.c index c8079dc..17da005 100644 --- a/drivers/pci/host/pcie-designware-plat.c +++ b/drivers/pci/host/pcie-designware-plat.c @@ -100,9 +100,6 @@ static int dw_plat_pcie_probe(struct platform_device *pdev) pp->dev = &pdev->dev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - dw_plat_pcie->mem_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(dw_plat_pcie->mem_base)) return PTR_ERR(dw_plat_pcie->mem_base); |