diff options
Diffstat (limited to 'arch/sparc/kernel/sun4d_irq.c')
-rw-r--r-- | arch/sparc/kernel/sun4d_irq.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index d4f9da8170c5..0e27e226e0e2 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -327,7 +327,7 @@ int sun4d_request_irq(unsigned int irq, | |||
327 | } | 327 | } |
328 | 328 | ||
329 | if (action == NULL) | 329 | if (action == NULL) |
330 | action = (struct irqaction *)kmalloc(sizeof(struct irqaction), | 330 | action = kmalloc(sizeof(struct irqaction), |
331 | GFP_ATOMIC); | 331 | GFP_ATOMIC); |
332 | 332 | ||
333 | if (!action) { | 333 | if (!action) { |
@@ -545,8 +545,11 @@ void __init sun4d_init_sbi_irq(void) | |||
545 | nsbi = 0; | 545 | nsbi = 0; |
546 | for_each_sbus(sbus) | 546 | for_each_sbus(sbus) |
547 | nsbi++; | 547 | nsbi++; |
548 | sbus_actions = (struct sbus_action *)kmalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); | 548 | sbus_actions = kzalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); |
549 | memset (sbus_actions, 0, (nsbi * 8 * 4 * sizeof(struct sbus_action))); | 549 | if (!sbus_actions) { |
550 | prom_printf("SUN4D: Cannot allocate sbus_actions, halting.\n"); | ||
551 | prom_halt(); | ||
552 | } | ||
550 | for_each_sbus(sbus) { | 553 | for_each_sbus(sbus) { |
551 | #ifdef CONFIG_SMP | 554 | #ifdef CONFIG_SMP |
552 | extern unsigned char boot_cpu_id; | 555 | extern unsigned char boot_cpu_id; |