diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2017-07-16 09:39:45 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-08-04 00:14:32 +0300 |
commit | 4a301766f5263dd94c1b95d1b1bbdf338afb1a37 (patch) | |
tree | 9013a6e5a8441611534df7db0c4ecb5fbb80b880 /drivers/pci/dwc/pcie-artpec6.c | |
parent | e9be4d78618af2e0d5592d9556cf0bba210cfd1a (diff) | |
download | linux-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-artpec6.c')
-rw-r--r-- | drivers/pci/dwc/pcie-artpec6.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c index 01c6f7823672..5d81f1d884e3 100644 --- a/drivers/pci/dwc/pcie-artpec6.c +++ b/drivers/pci/dwc/pcie-artpec6.c @@ -175,13 +175,15 @@ static void artpec6_pcie_enable_interrupts(struct artpec6_pcie *artpec6_pcie) dw_pcie_msi_init(pp); } -static void artpec6_pcie_host_init(struct pcie_port *pp) +static int artpec6_pcie_host_init(struct pcie_port *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct artpec6_pcie *artpec6_pcie = to_artpec6_pcie(pci); artpec6_pcie_establish_link(artpec6_pcie); artpec6_pcie_enable_interrupts(artpec6_pcie); + + return 0; } static const struct dw_pcie_host_ops artpec6_pcie_host_ops = { |