ide: remove needless zeroing of hwgroup fields from init_irq()

Since kmalloc_node() is called with __GFP_ZERO flag there is no need to
explicitly zero hwgroup fields.

While at it:

* Use 'hwif' instead of 'hwif->drives[0].hwif' for kmalloc_node() call.

* Fix whitespace damage.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <>
parent a6fbb1c8
......@@ -998,19 +998,14 @@ static int init_irq (ide_hwif_t *hwif)
hwgroup->hwif->next = hwif;
} else {
hwgroup = kmalloc_node(sizeof(ide_hwgroup_t),
if (!hwgroup)
goto out_up;
hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
if (hwgroup == NULL)
goto out_up;
hwif->hwgroup = hwgroup;
hwgroup->hwif = hwif->next = hwif;
hwgroup->hwif = hwif->next = hwif;
hwgroup->rq = NULL;
hwgroup->handler = NULL;
hwgroup->drive = NULL;
hwgroup->busy = 0;
hwgroup->timer.function = &ide_timer_expiry;
hwgroup-> = (unsigned long) hwgroup;
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