diff options
Diffstat (limited to 'drivers/mtd/cmdlinepart.c')
-rw-r--r-- | drivers/mtd/cmdlinepart.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index 3402ce448702..23fab14f1637 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c | |||
@@ -163,13 +163,12 @@ static struct mtd_partition * newpart(char *s, | |||
163 | *num_parts = this_part + 1; | 163 | *num_parts = this_part + 1; |
164 | alloc_size = *num_parts * sizeof(struct mtd_partition) + | 164 | alloc_size = *num_parts * sizeof(struct mtd_partition) + |
165 | extra_mem_size; | 165 | extra_mem_size; |
166 | parts = kmalloc(alloc_size, GFP_KERNEL); | 166 | parts = kzalloc(alloc_size, GFP_KERNEL); |
167 | if (!parts) | 167 | if (!parts) |
168 | { | 168 | { |
169 | printk(KERN_ERR ERRP "out of memory\n"); | 169 | printk(KERN_ERR ERRP "out of memory\n"); |
170 | return NULL; | 170 | return NULL; |
171 | } | 171 | } |
172 | memset(parts, 0, alloc_size); | ||
173 | extra_mem = (unsigned char *)(parts + *num_parts); | 172 | extra_mem = (unsigned char *)(parts + *num_parts); |
174 | } | 173 | } |
175 | /* enter this partition (offset will be calculated later if it is zero at this point) */ | 174 | /* enter this partition (offset will be calculated later if it is zero at this point) */ |