diff mbox

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

Message ID 20180214160252.32230-1-colin.king@canonical.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Colin King Feb. 14, 2018, 4:02 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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@canonical.com>
---
 drivers/scsi/myrs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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;