diff options
Diffstat (limited to 'arch/mips/pci/pci-lantiq.c')
-rw-r--r-- | arch/mips/pci/pci-lantiq.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c index 37fe8e7887e2..d3ed15b2b2d1 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) | |||
215 | 215 | ||
216 | pci_clear_flags(PCI_PROBE_ONLY); | 216 | pci_clear_flags(PCI_PROBE_ONLY); |
217 | 217 | ||
218 | res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
219 | res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 218 | res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
220 | if (!res_cfg || !res_bridge) { | ||
221 | dev_err(&pdev->dev, "missing memory resources\n"); | ||
222 | return -EINVAL; | ||
223 | } | ||
224 | |||
225 | ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge); | 219 | ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge); |
226 | if (IS_ERR(ltq_pci_membase)) | 220 | if (IS_ERR(ltq_pci_membase)) |
227 | return PTR_ERR(ltq_pci_membase); | 221 | return PTR_ERR(ltq_pci_membase); |
228 | 222 | ||
223 | res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
229 | ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg); | 224 | ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg); |
230 | if (IS_ERR(ltq_pci_mapped_cfg)) | 225 | if (IS_ERR(ltq_pci_mapped_cfg)) |
231 | return PTR_ERR(ltq_pci_mapped_cfg); | 226 | return PTR_ERR(ltq_pci_mapped_cfg); |