summaryrefslogtreecommitdiff
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorluo penghao <luo.penghao@zte.com.cn>2021-11-04 06:45:46 +0000
committerJens Axboe <axboe@kernel.dk>2021-11-04 05:47:53 -0600
commit18c6c96897a3b1ba44ab4df7324bf0b3454e090b (patch)
tree0275fe40f7262fb0f9799c6d2f4ec336e6319915 /drivers/block/loop.c
parent27548088ac628109f70eb0b1eb521d035844dba8 (diff)
loop: Remove duplicate assignments
The assignment and operation there will be overwritten later, so it should be deleted. The clang_analyzer complains as follows: drivers/block/loop.c:2330:2 warning: Value stored to 'err' is never read change in v2: Repair the sending email box Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: luo penghao <luo.penghao@zte.com.cn> Link: https://lore.kernel.org/r/20211104064546.3074-1-luo.penghao@zte.com.cn Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 302ac8f4f8ac..686b0a19f794 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2003,7 +2003,6 @@ static int loop_add(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;