[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>
Цей коміт міститься в:

зафіксовано
Linus Torvalds

джерело
9c2153844d
коміт
f5e3c2faa2
@@ -4850,7 +4850,7 @@ static int ide_tape_probe(struct device *dev)
|
||||
printk(KERN_WARNING "ide-tape: Use drive %s with ide-scsi emulation and osst.\n", drive->name);
|
||||
printk(KERN_WARNING "ide-tape: OnStream support will be removed soon from ide-tape!\n");
|
||||
}
|
||||
tape = (idetape_tape_t *) kmalloc (sizeof (idetape_tape_t), GFP_KERNEL);
|
||||
tape = (idetape_tape_t *) kzalloc (sizeof (idetape_tape_t), GFP_KERNEL);
|
||||
if (tape == NULL) {
|
||||
printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name);
|
||||
goto failed;
|
||||
@@ -4864,8 +4864,6 @@ static int ide_tape_probe(struct device *dev)
|
||||
|
||||
ide_register_subdriver(drive, &idetape_driver);
|
||||
|
||||
memset(tape, 0, sizeof(*tape));
|
||||
|
||||
kref_init(&tape->kref);
|
||||
|
||||
tape->drive = drive;
|
||||
|
Посилання в новій задачі
Заблокувати користувача