aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-probe.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 00b2b07f63be..84810aa57a67 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -998,19 +998,14 @@ static int init_irq (ide_hwif_t *hwif)
998 hwgroup->hwif->next = hwif; 998 hwgroup->hwif->next = hwif;
999 spin_unlock_irq(&ide_lock); 999 spin_unlock_irq(&ide_lock);
1000 } else { 1000 } else {
1001 hwgroup = kmalloc_node(sizeof(ide_hwgroup_t), 1001 hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
1002 GFP_KERNEL | __GFP_ZERO, 1002 hwif_to_node(hwif));
1003 hwif_to_node(hwif->drives[0].hwif)); 1003 if (hwgroup == NULL)
1004 if (!hwgroup) 1004 goto out_up;
1005 goto out_up;
1006 1005
1007 hwif->hwgroup = hwgroup; 1006 hwif->hwgroup = hwgroup;
1007 hwgroup->hwif = hwif->next = hwif;
1008 1008
1009 hwgroup->hwif = hwif->next = hwif;
1010 hwgroup->rq = NULL;
1011 hwgroup->handler = NULL;
1012 hwgroup->drive = NULL;
1013 hwgroup->busy = 0;
1014 init_timer(&hwgroup->timer); 1009 init_timer(&hwgroup->timer);
1015 hwgroup->timer.function = &ide_timer_expiry; 1010 hwgroup->timer.function = &ide_timer_expiry;
1016 hwgroup->timer.data = (unsigned long) hwgroup; 1011 hwgroup->timer.data = (unsigned long) hwgroup;