diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2005-11-07 04:01:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:00 -0500 |
commit | f5e3c2faa20615e900ab26bd957f898400435924 (patch) | |
tree | d3dd4c93539f155e3fd4ef18ae9cfe482ed1b340 /drivers/ide/ide-floppy.c | |
parent | 9c2153844d72ac92b6da0ee42f7f81fb0aa91f8a (diff) |
[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>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 29c22fc278c6..e83f54d37f96 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -2146,7 +2146,7 @@ static int ide_floppy_probe(struct device *dev) | |||
2146 | printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name); | 2146 | printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name); |
2147 | goto failed; | 2147 | goto failed; |
2148 | } | 2148 | } |
2149 | if ((floppy = (idefloppy_floppy_t *) kmalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) { | 2149 | if ((floppy = (idefloppy_floppy_t *) kzalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) { |
2150 | printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name); | 2150 | printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name); |
2151 | goto failed; | 2151 | goto failed; |
2152 | } | 2152 | } |
@@ -2159,8 +2159,6 @@ static int ide_floppy_probe(struct device *dev) | |||
2159 | 2159 | ||
2160 | ide_register_subdriver(drive, &idefloppy_driver); | 2160 | ide_register_subdriver(drive, &idefloppy_driver); |
2161 | 2161 | ||
2162 | memset(floppy, 0, sizeof(*floppy)); | ||
2163 | |||
2164 | kref_init(&floppy->kref); | 2162 | kref_init(&floppy->kref); |
2165 | 2163 | ||
2166 | floppy->drive = drive; | 2164 | floppy->drive = drive; |