diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2017-07-15 23:39:45 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-08-03 16:14:32 -0500 |
commit | 4a301766f5263dd94c1b95d1b1bbdf338afb1a37 (patch) | |
tree | 9013a6e5a8441611534df7db0c4ecb5fbb80b880 /drivers/pci/dwc/pci-imx6.c | |
parent | e9be4d78618af2e0d5592d9556cf0bba210cfd1a (diff) |
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/pci-imx6.c')
-rw-r--r-- | drivers/pci/dwc/pci-imx6.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/dwc/pci-imx6.c b/drivers/pci/dwc/pci-imx6.c index bf5c3616e344..20aae4469ee4 100644 --- a/drivers/pci/dwc/pci-imx6.c +++ b/drivers/pci/dwc/pci-imx6.c @@ -636,7 +636,7 @@ err_reset_phy: return ret; } -static void imx6_pcie_host_init(struct pcie_port *pp) +static int imx6_pcie_host_init(struct pcie_port *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci); @@ -649,6 +649,8 @@ static void imx6_pcie_host_init(struct pcie_port *pp) if (IS_ENABLED(CONFIG_PCI_MSI)) dw_pcie_msi_init(pp); + + return 0; } static int imx6_pcie_link_up(struct dw_pcie *pci) |