aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 234f5de3e929..e827b39e4b3c 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -1215,7 +1215,7 @@ static int ide_disk_probe(struct device *dev)
1215 if (drive->media != ide_disk) 1215 if (drive->media != ide_disk)
1216 goto failed; 1216 goto failed;
1217 1217
1218 idkp = kmalloc(sizeof(*idkp), GFP_KERNEL); 1218 idkp = kzalloc(sizeof(*idkp), GFP_KERNEL);
1219 if (!idkp) 1219 if (!idkp)
1220 goto failed; 1220 goto failed;
1221 1221
@@ -1228,8 +1228,6 @@ static int ide_disk_probe(struct device *dev)
1228 1228
1229 ide_register_subdriver(drive, &idedisk_driver); 1229 ide_register_subdriver(drive, &idedisk_driver);
1230 1230
1231 memset(idkp, 0, sizeof(*idkp));
1232
1233 kref_init(&idkp->kref); 1231 kref_init(&idkp->kref);
1234 1232
1235 idkp->drive = drive; 1233 idkp->drive = drive;