summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <james.smart@avagotech.com>2015-05-22 10:42:39 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-06-13 08:22:04 -0700
commit5116fbf136ea21b8678a85eee5c03508736ada9f (patch)
tree937f71f6ddc91f4c40574d40f6667e8b493202de /drivers/scsi
parent8b0dff14164d3f43eba8365950b506d898e0e1e6 (diff)
downloadop-kernel-dev-5116fbf136ea21b8678a85eee5c03508736ada9f.zip
op-kernel-dev-5116fbf136ea21b8678a85eee5c03508736ada9f.tar.gz
lpfc: Fix scsi prep dma buf error.
Didn't check for less-than-or-equal zero. Means we may later call scsi_dma_unmap() even though we don't have valid mappings. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 4a2a818..b3b195f 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3257,7 +3257,7 @@ lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd)
*/
nseg = scsi_dma_map(scsi_cmnd);
- if (unlikely(!nseg))
+ if (unlikely(nseg <= 0))
return 1;
sgl += 1;
/* clear the last flag in the fcp_rsp map entry */
OpenPOWER on IntegriCloud