summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-11-07 01:01:25 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:54:00 -0800
commitf5e3c2faa20615e900ab26bd957f898400435924 (patch)
treed3dd4c93539f155e3fd4ef18ae9cfe482ed1b340 /drivers/ide/ide.c
parent9c2153844d72ac92b6da0ee42f7f81fb0aa91f8a (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.c')
-rw-r--r--drivers/ide/ide.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 73ca8f73917..1bbf67882ae 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -864,9 +864,8 @@ static int __ide_add_setting(ide_drive_t *drive, const char *name, int rw, int r
down(&ide_setting_sem);
while ((*p) && strcmp((*p)->name, name) < 0)
p = &((*p)->next);
- if ((setting = kmalloc(sizeof(*setting), GFP_KERNEL)) == NULL)
+ if ((setting = kzalloc(sizeof(*setting), GFP_KERNEL)) == NULL)
goto abort;
- memset(setting, 0, sizeof(*setting));
if ((setting->name = kmalloc(strlen(name) + 1, GFP_KERNEL)) == NULL)
goto abort;
strcpy(setting->name, name);