[PATCH][scsi-next] scsi: myrs: ensure sge_count is set correctly

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

 



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

The DMA size is not being assigned to sge_count, instead sge_addr is
being assigned this value, which is incorrected.

Detected by CoverityScan, CID#1465233 ("Unused value")

Fixes: 8a8606895947 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
 drivers/scsi/myrs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 16498e1b0dd4..eb67ed3a7cff 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -442,7 +442,7 @@ myrs_translate_pdev(myrs_hba *cs, unsigned char channel,
 		DAC960_V2_TranslatePhysicalToLogicalDevice;
 	sgl = &mbox->PhysicalDeviceInfo.dma_addr;
 	sgl->sge[0].sge_addr = devmap_addr;
-	sgl->sge[0].sge_addr = mbox->PhysicalDeviceInfo.dma_size;
+	sgl->sge[0].sge_count = mbox->PhysicalDeviceInfo.dma_size;
 
 	myrs_exec_cmd(cs, cmd_blk);
 	status = cmd_blk->status;
-- 
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