patch-2.4.19 linux-2.4.19/drivers/sbus/sbus.c

Next file: linux-2.4.19/drivers/scsi/3w-xxxx.c
Previous file: linux-2.4.19/drivers/sbus/char/zs.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/sbus/sbus.c linux-2.4.19/drivers/sbus/sbus.c
@@ -391,6 +391,10 @@
 		sbus_bus_ranges_init(iommund, sbus);
 
 		sbus_devs = prom_getchild(this_sbus);
+		if (!sbus_devs) {
+			sbus->devices = NULL;
+			goto next_bus;
+		}
 
 		sbus->devices = kmalloc(sizeof(struct sbus_dev), GFP_ATOMIC);
 
@@ -454,7 +458,7 @@
 		sbus_fixup_all_regs(sbus->devices);
 
 		dvma_init(sbus);
-
+	next_bus:
 		num_sbus++;
 		if(sparc_cpu_model == sun4u) {
 			this_sbus = prom_getsibling(this_sbus);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)