@@ -578,8 +578,11 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
}
}
- if (pp->ops->host_init)
- pp->ops->host_init(pp);
+ if (pp->ops->host_init) {
+ ret = pp->ops->host_init(pp);
+ if (ret < 0)
+ return ret;
+ }
dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0);
@@ -72,7 +72,7 @@ struct pcie_host_ops {
int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus,
unsigned int devfn, int where, int size, u32 val);
int (*link_up)(struct pcie_port *pp);
- void (*host_init)(struct pcie_port *pp);
+ int (*host_init)(struct pcie_port *pp);
void (*msi_set_irq)(struct pcie_port *pp, int irq);
void (*msi_clear_irq)(struct pcie_port *pp, int irq);
u32 (*get_msi_data)(struct pcie_port *pp);
host init maybe failed, change the func type of host_init defined in struct pci_host_ops from void to int. Signed-off-by: Richard Zhu <richard.zhu@freescale.com> --- drivers/pci/host/pcie-designware.c | 7 +++++-- drivers/pci/host/pcie-designware.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-)