Skip to content

Commit

Permalink
PCI: designware: Remove redundant platform_get_resource() return valu…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
Wei Yongjun authored and Bjorn Helgaas committed Aug 23, 2016
1 parent 68a0bfe commit 639c532
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/pci/host/pcie-designware-plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 639c532

Please sign in to comment.