lkml.org 
[lkml]   [2019]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] loop: remove redundant assignment to err
Date
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 --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;
--
2.24.0
\
 
 \ /
  Last update: 2019-12-02 17:54    [W:0.034 / U:42.080 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site