summaryrefslogtreecommitdiff
path: root/drivers/pci/dwc/pcie-designware-plat.c
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2017-07-16 09:39:45 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-08-04 00:14:32 +0300
commit4a301766f5263dd94c1b95d1b1bbdf338afb1a37 (patch)
tree9013a6e5a8441611534df7db0c4ecb5fbb80b880 /drivers/pci/dwc/pcie-designware-plat.c
parente9be4d78618af2e0d5592d9556cf0bba210cfd1a (diff)
downloadlinux-4a301766f5263dd94c1b95d1b1bbdf338afb1a37.tar.xz
PCI: dwc: designware: Handle ->host_init() failures
In several dwc-based drivers, ->host_init() can fail, so make sure to propagate and handle this to avoid continuing operation of a driver or hardware in an invalid state. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Joao Pinto <jpinto@synopsys.com> Acked-by: Jingoo Han <jingoohan1@gmail.com>
Diffstat (limited to 'drivers/pci/dwc/pcie-designware-plat.c')
-rw-r--r--drivers/pci/dwc/pcie-designware-plat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/dwc/pcie-designware-plat.c b/drivers/pci/dwc/pcie-designware-plat.c
index 091b4e7ad059..168e2380f493 100644
--- a/drivers/pci/dwc/pcie-designware-plat.c
+++ b/drivers/pci/dwc/pcie-designware-plat.c
@@ -35,7 +35,7 @@ static irqreturn_t dw_plat_pcie_msi_irq_handler(int irq, void *arg)
return dw_handle_msi_irq(pp);
}
-static void dw_plat_pcie_host_init(struct pcie_port *pp)
+static int dw_plat_pcie_host_init(struct pcie_port *pp)
{
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
@@ -44,6 +44,8 @@ static void dw_plat_pcie_host_init(struct pcie_port *pp)
if (IS_ENABLED(CONFIG_PCI_MSI))
dw_pcie_msi_init(pp);
+
+ return 0;
}
static const struct dw_pcie_host_ops dw_plat_pcie_host_ops = {