[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
@@ -596,14 +596,13 @@ static inline u8 probe_for_drive (ide_drive_t *drive)
|
||||
* Also note that 0 everywhere means "can't do X"
|
||||
*/
|
||||
|
||||
drive->id = kmalloc(SECTOR_WORDS *4, GFP_KERNEL);
|
||||
drive->id = kzalloc(SECTOR_WORDS *4, GFP_KERNEL);
|
||||
drive->id_read = 0;
|
||||
if(drive->id == NULL)
|
||||
{
|
||||
printk(KERN_ERR "ide: out of memory for id data.\n");
|
||||
return 0;
|
||||
}
|
||||
memset(drive->id, 0, SECTOR_WORDS * 4);
|
||||
strcpy(drive->id->model, "UNKNOWN");
|
||||
|
||||
/* skip probing? */
|
||||
|
||||
Reference in New Issue
Block a user