[PATCH][scsi-next] scsi: myrb: remove shadowed and unassigned variable ldev_num

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

 



From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

A lower-scoped variable ldev_num is never assigned and is shadowing
the higher scoped iterator ldev_num and should be removed to avoid
using garbage ldev_num values.

Detected by CoverityScan, CID#1465226 ("Uninitialized scalar variable")

Fixes: dd47c1072226 ("scsi: myrb: Add Mylex RAID controller (block interface)")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
 drivers/scsi/myrb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index 973a2250208f..65ade4d37b33 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -422,7 +422,6 @@ static unsigned short myrb_get_ldev_info(myrb_hba *cb)
 		myrb_ldev_info *old = NULL;
 		myrb_ldev_info *new = cb->ldev_info_buf[ldev_num];
 		struct scsi_device *sdev;
-		unsigned short ldev_num;
 		myrb_devstate old_state = DAC960_V1_Device_Offline;
 
 		sdev = scsi_device_lookup(shost, myrb_logical_channel(shost),
-- 
2.15.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux