]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/partitions/check.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / fs / partitions / check.c
index 9a3a058f355365405911c3f1173209cfac30150d..783c57ec07d34cb83828980f2fd88fe8c6a5ac63 100644 (file)
@@ -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);