[SCSI] QLOGICPTI: Do not unmap DMA unless we actually mapped something.
authorDavid S. Miller <davem@davemloft.net>
Thu, 19 Apr 2007 23:31:17 +0000 (01:31 +0200)
committerAdrian Bunk <bunk@stusta.de>
Thu, 19 Apr 2007 23:31:17 +0000 (01:31 +0200)
commitad65d701caf0937add48e1c54263850a6a382d27
tree4270124dfc22a85f7ef8943723d8086334989306
parenteed22cdc141e11eacd8cd544bdc41432ceb506d1
[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>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
drivers/scsi/qlogicpti.c