diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-04-14 19:29:10 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-14 19:29:10 +0200 |
commit | 8d3ee2cb0ab59f78fdc801ede7db15ef47387bd0 (patch) | |
tree | 004a3b3b5f0d1bc9a32d27bc7f555bae5a04112a /drivers/scsi/qlogicpti.c | |
parent | DVB: dvb-usb-remote - fix oops when changing keymap (diff) | |
download | linux-8d3ee2cb0ab59f78fdc801ede7db15ef47387bd0.tar.xz linux-8d3ee2cb0ab59f78fdc801ede7db15ef47387bd0.zip |
[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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/qlogicpti.c')
-rw-r--r-- | drivers/scsi/qlogicpti.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 9b827ceec501..9f10689905a8 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -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, |