projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1dfc35
)
[POWERPC] allocation fix in ppc/platforms/4xx/luan.c
author
Roel Kluin
<12o3l@tiscali.nl>
Sat, 27 Oct 2007 14:22:13 +0000
(
00:22
+1000)
committer
Josh Boyer
<jwboyer@linux.vnet.ibm.com>
Thu, 1 Nov 2007 12:14:09 +0000
(07:14 -0500)
Don't allocate hose2 when when hose1 can't be allocated and free hose1 when
hose2 can't be allocated.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
arch/ppc/platforms/4xx/luan.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/ppc/platforms/4xx/luan.c
b/arch/ppc/platforms/4xx/luan.c
index 4b169610f15425865e3993726390123c60350c30..b79ebb8a3e6cd16ccde2ff5bca8d1d1cd9a7c4ad 100644
(file)
--- a/
arch/ppc/platforms/4xx/luan.c
+++ b/
arch/ppc/platforms/4xx/luan.c
@@
-230,9
+230,14
@@
luan_setup_hoses(void)
/* Allocate hoses for PCIX1 and PCIX2 */
hose1 = pcibios_alloc_controller();
+ if (!hose1)
+ return;
+
hose2 = pcibios_alloc_controller();
- if (!hose1 || !hose2)
+ if (!hose2) {
+ pcibios_free_controller(hose1);
return;
+ }
/* Setup PCIX1 */
hose1->first_busno = 0;