Commit e0a7e563 authored by Hou Zhiqiang's avatar Hou Zhiqiang Committed by Lorenzo Pieralisi

PCI: mobiveil: Fix error return values

Some error return values in the host controller driver are
either unconventional or plain wrong. Update them all with
the expected return values.
Signed-off-by: default avatarHou Zhiqiang <Zhinqiang.Hou@nxp.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: default avatarMinghuan Lian <Minghuan.Lian@nxp.com>
Reviewed-by: default avatarSubrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
parent f97441f4
...@@ -822,7 +822,7 @@ static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie) ...@@ -822,7 +822,7 @@ static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie)
if (!pcie->intx_domain) { if (!pcie->intx_domain) {
dev_err(dev, "Failed to get a INTx IRQ domain\n"); dev_err(dev, "Failed to get a INTx IRQ domain\n");
return -ENODEV; return -ENOMEM;
} }
raw_spin_lock_init(&pcie->intx_mask_lock); raw_spin_lock_init(&pcie->intx_mask_lock);
...@@ -848,7 +848,7 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) ...@@ -848,7 +848,7 @@ static int mobiveil_pcie_probe(struct platform_device *pdev)
/* allocate the PCIe port */ /* allocate the PCIe port */
bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
if (!bridge) if (!bridge)
return -ENODEV; return -ENOMEM;
pcie = pci_host_bridge_priv(bridge); pcie = pci_host_bridge_priv(bridge);
if (!pcie) if (!pcie)
...@@ -869,7 +869,7 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) ...@@ -869,7 +869,7 @@ static int mobiveil_pcie_probe(struct platform_device *pdev)
&pcie->resources, &iobase); &pcie->resources, &iobase);
if (ret) { if (ret) {
dev_err(dev, "Getting bridge resources failed\n"); dev_err(dev, "Getting bridge resources failed\n");
return -ENOMEM; return ret;
} }
/* /*
......
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