summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-11-30 17:11:26 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-10 02:40:10 -0800
commitd4accd60d23f3c8a576fd08b727f88096f42d445 (patch)
treea1d490ef2eebbdedf3703f4ae0829bf85d8efbfe /arch/sparc/kernel
parentc80892d150a872b18cedfbf789211bfbebfc67ce (diff)
[SPARC]: Check kzalloc() return value in SUN4D irq/iommu init.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/sun4d_irq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index b8bd53ab29c5..cf1b8baa57ea 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -546,6 +546,10 @@ void __init sun4d_init_sbi_irq(void)
for_each_sbus(sbus)
nsbi++;
sbus_actions = kzalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC);
+ if (!sbus_actions) {
+ prom_printf("SUN4D: Cannot allocate sbus_actions, halting.\n");
+ prom_halt();
+ }
for_each_sbus(sbus) {
#ifdef CONFIG_SMP
extern unsigned char boot_cpu_id;