[dm-devel] [PATCH] dm integrity: fix the unused variables

Tian Tao tiantao6 at hisilicon.com
Wed Apr 14 01:43:44 UTC 2021


The value of r is not used, so fixes this as add a goto statement.

Signed-off-by: Tian Tao <tiantao6 at hisilicon.com>
---
 drivers/md/dm-integrity.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index fed8a7c..6977422 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4049,6 +4049,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
 			if (val >= (uint64_t)UINT_MAX * 1000 / HZ) {
 				r = -EINVAL;
 				ti->error = "Invalid bitmap_flush_interval argument";
+				goto bad;
 			}
 			ic->bitmap_flush_interval = msecs_to_jiffies(val);
 		} else if (!strncmp(opt_string, "internal_hash:", strlen("internal_hash:"))) {
-- 
2.7.4




More information about the dm-devel mailing list