[dm-devel] [PATCH 3/9] md/dm-table: Delete an unnecessary variable initialisation in dm_table_register_integrity()

SF Markus Elfring elfring at users.sourceforge.net
Sat Oct 1 07:45:37 UTC 2016


From: Markus Elfring <elfring at users.sourceforge.net>
Date: Sat, 1 Oct 2016 07:25:43 +0200

The local variable "template_disk" is reassigned by a statement
at the beginning. Thus omit the explicit initialisation.

Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
---
 drivers/md/dm-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 73d38d0..67cc635 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1165,7 +1165,7 @@ static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t)
 static int dm_table_register_integrity(struct dm_table *t)
 {
 	struct mapped_device *md = t->md;
-	struct gendisk *template_disk = NULL;
+	struct gendisk *template_disk;
 
 	template_disk = dm_table_get_integrity_disk(t);
 	if (!template_disk)
-- 
2.10.0




More information about the dm-devel mailing list