diff options
author | Wolfgang Denk <wd@denx.de> | 2011-10-29 09:38:31 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-11-03 20:40:38 +0100 |
commit | e5d5ed4b20821cbab128802daad16c386400d6de (patch) | |
tree | 2ae01085d2fb45b6a72f698665bdb79d0119aee1 /arch/powerpc/cpu/ppc4xx | |
parent | ec98a9bd4ea3577afdb858940f8df074eda73923 (diff) |
4xx_pci.c: add error checking, fix GCC 4.6 build warning
Fix:
4xx_pci.c: In function 'pci_init_board':
4xx_pci.c:855:6: warning: variable 'busno' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/powerpc/cpu/ppc4xx')
-rw-r--r-- | arch/powerpc/cpu/ppc4xx/4xx_pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/ppc4xx/4xx_pci.c b/arch/powerpc/cpu/ppc4xx/4xx_pci.c index 80b0c1c6fc..2ca355b134 100644 --- a/arch/powerpc/cpu/ppc4xx/4xx_pci.c +++ b/arch/powerpc/cpu/ppc4xx/4xx_pci.c @@ -707,7 +707,7 @@ void pci_master_init(struct pci_controller *hose) #endif /* CONFIG_SYS_PCI_MASTER_INIT */ #if defined(CONFIG_SYS_PCI_MASTER_INIT) || defined(CONFIG_SYS_PCI_TARGET_INIT) -int pci_440_init (struct pci_controller *hose) +static int pci_440_init (struct pci_controller *hose) { int reg_num = 0; @@ -859,7 +859,9 @@ void pci_init_board(void) * is selected. */ #if defined(CONFIG_SYS_PCI_MASTER_INIT) || defined(CONFIG_SYS_PCI_TARGET_INIT) - busno = pci_440_init (&ppc440_hose); + busno = pci_440_init(&ppc440_hose); + if (busno < 0) + return; #endif #if (defined(CONFIG_440SPE) || \ defined(CONFIG_460EX) || defined(CONFIG_460GT)) && \ |