Skip to content

Commit c2dd32e

Browse files
Stephen M. CameronJames Bottomley
authored andcommitted
[SCSI] hpsa: fix dma unmap error in hpsa_passthru_ioctl
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 3855356 commit c2dd32e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/hpsa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2580,7 +2580,8 @@ static int hpsa_passthru_ioctl(struct ctlr_info *h, void __user *argp)
25802580
c->SG[0].Ext = 0; /* we are not chaining*/
25812581
}
25822582
hpsa_scsi_do_simple_cmd_core(h, c);
2583-
hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL);
2583+
if (iocommand.buf_size > 0)
2584+
hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL);
25842585
check_ioctl_unit_attention(h, c);
25852586

25862587
/* Copy the error information out */

0 commit comments

Comments
 (0)