diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 73ca8f73917d..1bbf67882ae5 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 | |||
864 | down(&ide_setting_sem); | 864 | down(&ide_setting_sem); |
865 | while ((*p) && strcmp((*p)->name, name) < 0) | 865 | while ((*p) && strcmp((*p)->name, name) < 0) |
866 | p = &((*p)->next); | 866 | p = &((*p)->next); |
867 | if ((setting = kmalloc(sizeof(*setting), GFP_KERNEL)) == NULL) | 867 | if ((setting = kzalloc(sizeof(*setting), GFP_KERNEL)) == NULL) |
868 | goto abort; | 868 | goto abort; |
869 | memset(setting, 0, sizeof(*setting)); | ||
870 | if ((setting->name = kmalloc(strlen(name) + 1, GFP_KERNEL)) == NULL) | 869 | if ((setting->name = kmalloc(strlen(name) + 1, GFP_KERNEL)) == NULL) |
871 | goto abort; | 870 | goto abort; |
872 | strcpy(setting->name, name); | 871 | strcpy(setting->name, name); |