diff options
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 98e0b85a9bb2..783c57ec07d3 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -372,11 +372,10 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len, | |||
372 | { | 372 | { |
373 | struct hd_struct *p; | 373 | struct hd_struct *p; |
374 | 374 | ||
375 | p = kmalloc(sizeof(*p), GFP_KERNEL); | 375 | p = kzalloc(sizeof(*p), GFP_KERNEL); |
376 | if (!p) | 376 | if (!p) |
377 | return; | 377 | return; |
378 | 378 | ||
379 | memset(p, 0, sizeof(*p)); | ||
380 | p->start_sect = start; | 379 | p->start_sect = start; |
381 | p->nr_sects = len; | 380 | p->nr_sects = len; |
382 | p->partno = part; | 381 | p->partno = part; |