]> Pileus Git - ~andy/linux/blobdiff - drivers/ide/ide-probe.c
ide: remove needless zeroing of hwgroup fields from init_irq()
[~andy/linux] / drivers / ide / ide-probe.c
index 00b2b07f63be8a821172d9eade48b0aa36ec6bcf..84810aa57a67daeef7c99f26e7a91a534ba1d124 100644 (file)
@@ -998,19 +998,14 @@ static int init_irq (ide_hwif_t *hwif)
                hwgroup->hwif->next = hwif;
                spin_unlock_irq(&ide_lock);
        } else {
-               hwgroup = kmalloc_node(sizeof(ide_hwgroup_t),
-                                       GFP_KERNEL | __GFP_ZERO,
-                                       hwif_to_node(hwif->drives[0].hwif));
-               if (!hwgroup)
-                       goto out_up;
+               hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
+                                      hwif_to_node(hwif));
+               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;
                init_timer(&hwgroup->timer);
                hwgroup->timer.function = &ide_timer_expiry;
                hwgroup->timer.data = (unsigned long) hwgroup;