diff options
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 8b9d85526596..74d2ab0d901e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -3455,7 +3455,7 @@ static int ide_cd_probe(struct device *dev) | |||
3455 | printk(KERN_INFO "ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name); | 3455 | printk(KERN_INFO "ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name); |
3456 | goto failed; | 3456 | goto failed; |
3457 | } | 3457 | } |
3458 | info = kmalloc(sizeof(struct cdrom_info), GFP_KERNEL); | 3458 | info = kzalloc(sizeof(struct cdrom_info), GFP_KERNEL); |
3459 | if (info == NULL) { | 3459 | if (info == NULL) { |
3460 | printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name); | 3460 | printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name); |
3461 | goto failed; | 3461 | goto failed; |
@@ -3469,8 +3469,6 @@ static int ide_cd_probe(struct device *dev) | |||
3469 | 3469 | ||
3470 | ide_register_subdriver(drive, &ide_cdrom_driver); | 3470 | ide_register_subdriver(drive, &ide_cdrom_driver); |
3471 | 3471 | ||
3472 | memset(info, 0, sizeof (struct cdrom_info)); | ||
3473 | |||
3474 | kref_init(&info->kref); | 3472 | kref_init(&info->kref); |
3475 | 3473 | ||
3476 | info->drive = drive; | 3474 | info->drive = drive; |