From: Stephen M. Cameron Date: Fri, 3 Jun 2011 14:57:29 +0000 (-0500) Subject: [SCSI] hpsa: fix dma unmap error in hpsa_passthru_ioctl X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c2dd32e02648d77466f320d6edd157b5080e7c99;p=mv-sheeva.git [SCSI] hpsa: fix dma unmap error in hpsa_passthru_ioctl Signed-off-by: Stephen M. Cameron Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c6c0434d803..a75122d1c71 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2580,7 +2580,8 @@ static int hpsa_passthru_ioctl(struct ctlr_info *h, void __user *argp) c->SG[0].Ext = 0; /* we are not chaining*/ } hpsa_scsi_do_simple_cmd_core(h, c); - hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); + if (iocommand.buf_size > 0) + hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); check_ioctl_unit_attention(h, c); /* Copy the error information out */