[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160623095204.32167-1-jthumshirn@suse.de>
Date: Thu, 23 Jun 2016 11:52:04 +0200
From: Johannes Thumshirn <jthumshirn@...e.de>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-nvdimm@...ts.01.org, linux-kernel@...r.kernel.org,
Johannes Thumshirn <jthumshirn@...e.de>
Subject: [PATCH] libnvdimm: initialize struct blk_integrity with 0
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@...e.de>
---
drivers/nvdimm/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c
index be89764..32e4fe2 100644
--- a/drivers/nvdimm/core.c
+++ b/drivers/nvdimm/core.c
@@ -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;
--
2.8.4
Powered by blists - more mailing lists