aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/sun4d_irq.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-10 10:00:00 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-10 10:00:00 -0800
commitedb16bec41db68b22799a5fbad82c3891e637565 (patch)
treed019d2fa8fbf374d810f66e1a210648e53b0c593 /arch/sparc/kernel/sun4d_irq.c
parentbb7320d1d96dc2e479180ae8e7a112caf0726ace (diff)
parentf0882589666440d573f657cb3a1d5f66f3caa157 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix several kprobes bugs. [SPARC64]: Update defconfig. [SPARC64]: dma remove extra brackets [SPARC{32,64}]: Propagate ptrace_traceme() return value. [SPARC64]: Replace kmalloc+memset with kzalloc [SPARC]: Check kzalloc() return value in SUN4D irq/iommu init. [SPARC]: Replace kmalloc+memset with kzalloc [SPARC64]: Run ctrl-alt-del action for sun4v powerdown request. [SPARC64]: Unaligned accesses to userspace are hard errors. [SPARC64]: Call do_mathemu on illegal instruction traps too. [SPARC64]: Update defconfig. [SPARC64]: Add irqtrace/stacktrace/lockdep support.
Diffstat (limited to 'arch/sparc/kernel/sun4d_irq.c')
-rw-r--r--arch/sparc/kernel/sun4d_irq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index d4f9da8170c..cf1b8baa57e 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -545,8 +545,11 @@ void __init sun4d_init_sbi_irq(void)
nsbi = 0;
for_each_sbus(sbus)
nsbi++;
- sbus_actions = (struct sbus_action *)kmalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC);
- memset (sbus_actions, 0, (nsbi * 8 * 4 * sizeof(struct sbus_action)));
+ 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;