aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/pci-sh7780.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-31 23:11:25 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-31 23:11:25 -0500
commitbcf39352eb9e9026f7a1028d4bce3707b65f104b (patch)
tree440794a7fe888c48bfb49bdd994873ae8a136866 /arch/sh/drivers/pci/pci-sh7780.c
parent85b59f5bb24aeca1a987cbb206e228bf630c8327 (diff)
sh: Handle PCI controller resource conflicts.
register_pci_controller() can fail, but presently is a void function. Change this over to an int so that we can bail early before continuing on with post-registration initialization (such as throwing the controller in to 66MHz mode in the case of the SH7780 host controller). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh7780.c')
-rw-r--r--arch/sh/drivers/pci/pci-sh7780.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c
index b68f45b6451a..0e0ddd67e6e1 100644
--- a/arch/sh/drivers/pci/pci-sh7780.c
+++ b/arch/sh/drivers/pci/pci-sh7780.c
@@ -71,6 +71,7 @@ static int __init sh7780_pci_init(void)
71 size_t memsize; 71 size_t memsize;
72 unsigned int id; 72 unsigned int id;
73 const char *type; 73 const char *type;
74 int ret;
74 75
75 printk(KERN_NOTICE "PCI: Starting intialization.\n"); 76 printk(KERN_NOTICE "PCI: Starting intialization.\n");
76 77
@@ -197,7 +198,9 @@ static int __init sh7780_pci_init(void)
197 __raw_writel(SH4_PCICR_PREFIX | SH4_PCICR_CFIN | SH4_PCICR_FTO, 198 __raw_writel(SH4_PCICR_PREFIX | SH4_PCICR_CFIN | SH4_PCICR_FTO,
198 chan->reg_base + SH4_PCICR); 199 chan->reg_base + SH4_PCICR);
199 200
200 register_pci_controller(chan); 201 ret = register_pci_controller(chan);
202 if (unlikely(ret))
203 return ret;
201 204
202 sh7780_pci66_init(chan); 205 sh7780_pci66_init(chan);
203 206