Commit 8cb95e05 authored by David S. Miller's avatar David S. Miller

In SBUS probing, handle empty SBUS correctly.

parent f9a5f2e5
...@@ -392,6 +392,10 @@ static int __init sbus_init(void) ...@@ -392,6 +392,10 @@ static int __init sbus_init(void)
sbus_bus_ranges_init(iommund, sbus); sbus_bus_ranges_init(iommund, sbus);
sbus_devs = prom_getchild(this_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); sbus->devices = kmalloc(sizeof(struct sbus_dev), GFP_ATOMIC);
...@@ -455,7 +459,7 @@ static int __init sbus_init(void) ...@@ -455,7 +459,7 @@ static int __init sbus_init(void)
sbus_fixup_all_regs(sbus->devices); sbus_fixup_all_regs(sbus->devices);
dvma_init(sbus); dvma_init(sbus);
next_bus:
num_sbus++; num_sbus++;
if(sparc_cpu_model == sun4u) { if(sparc_cpu_model == sun4u) {
this_sbus = prom_getsibling(this_sbus); this_sbus = prom_getsibling(this_sbus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment