diff mbox series

loop: remove redundant assignment to err

Message ID 20191202165408.64510-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show
Series loop: remove redundant assignment to err | expand

Commit Message

Colin King Dec. 2, 2019, 4:54 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable err is being assigned with a value that is never
read and it is being updated later with a new value.  The assignment
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/block/loop.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 739b372a5112..30f187786dae 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2006,7 +2006,6 @@  static int loop_add(struct loop_device **l, int i)
 		goto out_free_dev;
 	i = err;
 
-	err = -ENOMEM;
 	lo->tag_set.ops = &loop_mq_ops;
 	lo->tag_set.nr_hw_queues = 1;
 	lo->tag_set.queue_depth = 128;