Commit 5a1e73ff authored by Varka Bhadram's avatar Varka Bhadram Committed by Ralf Baechle

pci: pci-lantiq: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource()
Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Acked-by: default avatarJohn Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Varka Bhadram <varkab@cdac.in>
Patchwork: https://patchwork.linux-mips.org/patch/8199/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 507a369e
...@@ -215,17 +215,12 @@ static int ltq_pci_probe(struct platform_device *pdev) ...@@ -215,17 +215,12 @@ static int ltq_pci_probe(struct platform_device *pdev)
pci_clear_flags(PCI_PROBE_ONLY); pci_clear_flags(PCI_PROBE_ONLY);
res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1); res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!res_cfg || !res_bridge) {
dev_err(&pdev->dev, "missing memory resources\n");
return -EINVAL;
}
ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge); ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge);
if (IS_ERR(ltq_pci_membase)) if (IS_ERR(ltq_pci_membase))
return PTR_ERR(ltq_pci_membase); return PTR_ERR(ltq_pci_membase);
res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg); ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg);
if (IS_ERR(ltq_pci_mapped_cfg)) if (IS_ERR(ltq_pci_mapped_cfg))
return PTR_ERR(ltq_pci_mapped_cfg); return PTR_ERR(ltq_pci_mapped_cfg);
......
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