[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
@@ -2146,7 +2146,7 @@ static int ide_floppy_probe(struct device *dev)
|
||||
printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name);
|
||||
goto failed;
|
||||
}
|
||||
if ((floppy = (idefloppy_floppy_t *) kmalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
|
||||
if ((floppy = (idefloppy_floppy_t *) kzalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
|
||||
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
|
||||
goto failed;
|
||||
}
|
||||
@@ -2159,8 +2159,6 @@ static int ide_floppy_probe(struct device *dev)
|
||||
|
||||
ide_register_subdriver(drive, &idefloppy_driver);
|
||||
|
||||
memset(floppy, 0, sizeof(*floppy));
|
||||
|
||||
kref_init(&floppy->kref);
|
||||
|
||||
floppy->drive = drive;
|
||||
|
Reference in New Issue
Block a user