* [PATCH linux-next] md: Remove redundant assignments
@ 2021-11-04 6:19 cgel.zte
0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2021-11-04 6:19 UTC (permalink / raw)
To: Song Liu; +Cc: linux-raid, linux-kernel, luo penghao, Zeal Robot
From: luo penghao <luo.penghao@zte.com.cn>
The assignment of err will be overwritten next, so this statement
should be deleted.
The clang_analyzer complains as follows:
drivers/md/md-autodetect.c:178: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/md/md-autodetect.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/md-autodetect.c b/drivers/md/md-autodetect.c
index 2cf9737..ab425d5 100644
--- a/drivers/md/md-autodetect.c
+++ b/drivers/md/md-autodetect.c
@@ -175,7 +175,6 @@ static void __init md_setup_drive(struct md_setup_args *args)
return;
}
- err = -EIO;
if (WARN(bdev->bd_disk->fops != &md_fops,
"Opening block device %x resulted in non-md device\n",
mdev))
--
2.15.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-04 6:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 6:19 [PATCH linux-next] md: Remove redundant assignments cgel.zte
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).