[PATCH linux-next] md: Remove redundant assignments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux