libnvdimm: initialize struct blk_integrity with 0
authorJohannes Thumshirn <jthumshirn@suse.de>
Thu, 23 Jun 2016 09:52:04 +0000 (11:52 +0200)
committerDan Williams <dan.j.williams@intel.com>
Wed, 6 Jul 2016 17:34:42 +0000 (10:34 -0700)
Initialize struct blk_integrity with 0 as blk_integrity_register() takes the
then unitialized struct blk_integrity::flags and ORs it to the resulting block
integrity structure.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/core.c

index be89764315c2b54d9bbe9548fc3f6183d6032ea4..32e4fe2f62748ceb3ed17dec94432ad22af22626 100644 (file)
@@ -601,7 +601,8 @@ int nd_integrity_init(struct gendisk *disk, unsigned long meta_size)
        if (meta_size == 0)
                return 0;
 
-       bi.profile = NULL;
+       memset(&bi, 0, sizeof(bi));
+
        bi.tuple_size = meta_size;
        bi.tag_size = meta_size;