diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2015-03-20 15:26:51 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:44:28 +0900 |
commit | 57b836f148ed849c12db2be4c6a88ed361aa432a (patch) | |
tree | 4520dd7abbed0cc46f45363e9bc5e0d177984ffc | |
parent | 596710b51fa724a1d8eaa9eaaf5355537edba330 (diff) |
local/pci: pcie-designware: change return type for host_init() callback
host_init() can be failed.
If host_init() callback is failed, it has to fail probe.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r-- | drivers/pci/host/pcie-designware.c | 7 | ||||
-rw-r--r-- | drivers/pci/host/pcie-designware.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 12430f9f969a..37c4e877bd0a 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -499,8 +499,11 @@ int 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) + return ret; + } dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0); diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h index d0bbd276840d..e14f746df8d9 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h @@ -67,7 +67,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_addr)(struct pcie_port *pp); |