[PATCH linux-next] md: Remove redundant assignments
From: cgel . zte
Date: Thu Nov 04 2021 - 02:19:26 EST
From: luo penghao <luo.penghao@xxxxxxxxxx>
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@xxxxxxxxxx>
Signed-off-by: luo penghao <luo.penghao@xxxxxxxxxx>
---
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