md: Protect access to mddev->disks list using RCU
[pandora-kernel.git] / arch / ppc / platforms / 4xx / luan.c
index 4b16961..f6d8c2e 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/blkdev.h>
 #include <linux/console.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
@@ -230,9 +229,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;