diff options
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 9a3a058f355..783c57ec07d 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, { struct hd_struct *p; - p = kmalloc(sizeof(*p), GFP_KERNEL); + p = kzalloc(sizeof(*p), GFP_KERNEL); if (!p) return; - memset(p, 0, sizeof(*p)); p->start_sect = start; p->nr_sects = len; p->partno = part; @@ -397,7 +396,6 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len, static struct attribute addpartattr = { .name = "whole_disk", .mode = S_IRUSR | S_IRGRP | S_IROTH, - .owner = THIS_MODULE, }; sysfs_create_file(&p->kobj, &addpartattr); |