[PATCH] ide: kmalloc + memset -> kzalloc conversion
Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
9c2153844d
commit
f5e3c2faa2
@@ -1215,7 +1215,7 @@ static int ide_disk_probe(struct device *dev)
|
||||
if (drive->media != ide_disk)
|
||||
goto failed;
|
||||
|
||||
idkp = kmalloc(sizeof(*idkp), GFP_KERNEL);
|
||||
idkp = kzalloc(sizeof(*idkp), GFP_KERNEL);
|
||||
if (!idkp)
|
||||
goto failed;
|
||||
|
||||
@@ -1228,8 +1228,6 @@ static int ide_disk_probe(struct device *dev)
|
||||
|
||||
ide_register_subdriver(drive, &idedisk_driver);
|
||||
|
||||
memset(idkp, 0, sizeof(*idkp));
|
||||
|
||||
kref_init(&idkp->kref);
|
||||
|
||||
idkp->drive = drive;
|
||||
|
||||
Reference in New Issue
Block a user