* [PATCH linux-next] loop: Remove duplicate assignments
@ 2021-10-28 2:52 luo penghao
0 siblings, 0 replies; only message in thread
From: luo penghao @ 2021-10-28 2:52 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, linux-kernel, luo penghao, Zeal Robot
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
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
drivers/block/loop.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 1f91bd4..941b482 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2329,7 +2329,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;
--
2.15.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-28 2:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 2:52 [PATCH linux-next] loop: Remove duplicate assignments luo penghao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).