DORMANTno replies

[PATCH linux-next] md: Remove redundant assignments

From: <hidden>
Date: 2021-11-04 06:19:26
Also in: lkml
Subsystem: software raid (multiple disks) support, the rest · Maintainers: Song Liu, Yu Kuai, Linus Torvalds

From: luo penghao <redacted>

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 <redacted>
Signed-off-by: luo penghao <redacted>
---
 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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help