Skip to content

Commit

Permalink
genirq: use kzalloc instead of explicit zero initialization
Browse files Browse the repository at this point in the history
Impact: simplification

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
  • Loading branch information
Thomas Gleixner committed Mar 13, 2009
1 parent bedd30d commit 4553573
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,15 +737,13 @@ int request_irq(unsigned int irq, irq_handler_t handler,
if (!handler)
return -EINVAL;

action = kmalloc(sizeof(struct irqaction), GFP_KERNEL);
action = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
if (!action)
return -ENOMEM;

action->handler = handler;
action->flags = irqflags;
cpus_clear(action->mask);
action->name = devname;
action->next = NULL;
action->dev_id = dev_id;

retval = __setup_irq(irq, desc, action);
Expand Down

0 comments on commit 4553573

Please sign in to comment.