diff options
Diffstat (limited to 'drivers/pci/host/pci-mvebu.c')
| -rw-r--r-- | drivers/pci/host/pci-mvebu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 13a633b1612e..8fc2a8241fa8 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c | |||
| @@ -750,9 +750,9 @@ mvebu_pcie_map_registers(struct platform_device *pdev, | |||
| 750 | 750 | ||
| 751 | ret = of_address_to_resource(np, 0, ®s); | 751 | ret = of_address_to_resource(np, 0, ®s); |
| 752 | if (ret) | 752 | if (ret) |
| 753 | return NULL; | 753 | return ERR_PTR(ret); |
| 754 | 754 | ||
| 755 | return devm_request_and_ioremap(&pdev->dev, ®s); | 755 | return devm_ioremap_resource(&pdev->dev, ®s); |
| 756 | } | 756 | } |
| 757 | 757 | ||
| 758 | static int __init mvebu_pcie_probe(struct platform_device *pdev) | 758 | static int __init mvebu_pcie_probe(struct platform_device *pdev) |
| @@ -842,9 +842,10 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev) | |||
| 842 | continue; | 842 | continue; |
| 843 | 843 | ||
| 844 | port->base = mvebu_pcie_map_registers(pdev, child, port); | 844 | port->base = mvebu_pcie_map_registers(pdev, child, port); |
| 845 | if (!port->base) { | 845 | if (IS_ERR(port->base)) { |
| 846 | dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", | 846 | dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", |
| 847 | port->port, port->lane); | 847 | port->port, port->lane); |
| 848 | port->base = NULL; | ||
| 848 | continue; | 849 | continue; |
| 849 | } | 850 | } |
| 850 | 851 | ||
