Skip to content

Commit 639c532

Browse files
weiyjbjorn-helgaas
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 68a0bfe commit 639c532

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/pci/host/pcie-designware-plat.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ static int dw_plat_pcie_probe(struct platform_device *pdev)
100100
pp->dev = &pdev->dev;
101101

102102
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
103-
if (!res)
104-
return -ENODEV;
105-
106103
dw_plat_pcie->mem_base = devm_ioremap_resource(&pdev->dev, res);
107104
if (IS_ERR(dw_plat_pcie->mem_base))
108105
return PTR_ERR(dw_plat_pcie->mem_base);

0 commit comments

Comments
 (0)