Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d3ee2cb authored by David S. Miller's avatar David S. Miller
Browse files

[SCSI] QLOGICPTI: Do not unmap DMA unless we actually mapped something.



We only map DMA when cmd->request_bufflen is non-zero for non-sg
buffers, we thus should make the same check when unmapping.

Based upon a report from Pasi Pirhonen.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d791d413
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1281,7 +1281,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
				      (struct scatterlist *)Cmnd->request_buffer,
				      Cmnd->use_sg,
				      Cmnd->sc_data_direction);
		} else {
		} else if (Cmnd->request_bufflen) {
			sbus_unmap_single(qpti->sdev,
					  (__u32)((unsigned long)Cmnd->SCp.ptr),
					  Cmnd->request_bufflen,