diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index d5146c57e5b3..ec55a173c08a 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1317,12 +1317,14 @@ static int hwif_init(ide_hwif_t *hwif) | |||
1317 | if (!hwif->sg_max_nents) | 1317 | if (!hwif->sg_max_nents) |
1318 | hwif->sg_max_nents = PRD_ENTRIES; | 1318 | hwif->sg_max_nents = PRD_ENTRIES; |
1319 | 1319 | ||
1320 | hwif->sg_table = kzalloc(sizeof(struct scatterlist)*hwif->sg_max_nents, | 1320 | hwif->sg_table = kmalloc(sizeof(struct scatterlist)*hwif->sg_max_nents, |
1321 | GFP_KERNEL); | 1321 | GFP_KERNEL); |
1322 | if (!hwif->sg_table) { | 1322 | if (!hwif->sg_table) { |
1323 | printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name); | 1323 | printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name); |
1324 | goto out; | 1324 | goto out; |
1325 | } | 1325 | } |
1326 | |||
1327 | sg_init_table(hwif->sg_table, hwif->sg_max_nents); | ||
1326 | 1328 | ||
1327 | if (init_irq(hwif) == 0) | 1329 | if (init_irq(hwif) == 0) |
1328 | goto done; | 1330 | goto done; |