summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2014-10-22 09:31:15 +0530
committerRalf Baechle <ralf@linux-mips.org>2014-10-22 18:14:04 +0200
commit5a1e73ffe57a86a196c08dffcbd9866776594a38 (patch)
tree899df6d50b7be6723ce23a9997d6608e5d70e01d /arch/mips
parent507a369e126bf094ffcef77735a56e25a61e9041 (diff)
downloadop-kernel-dev-5a1e73ffe57a86a196c08dffcbd9866776594a38.zip
op-kernel-dev-5a1e73ffe57a86a196c08dffcbd9866776594a38.tar.gz
pci: pci-lantiq: remove duplicate check on resource
Sanity check on resource happening with devm_ioremap_resource() Signed-off-by: Varka Bhadram <varkab@cdac.in> Acked-by: John 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: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/pci/pci-lantiq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 37fe8e7..d3ed15b 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -215,17 +215,12 @@ static int ltq_pci_probe(struct platform_device *pdev)
pci_clear_flags(PCI_PROBE_ONLY);
- res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
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);
if (IS_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);
if (IS_ERR(ltq_pci_mapped_cfg))
return PTR_ERR(ltq_pci_mapped_cfg);
OpenPOWER on IntegriCloud