From: Shuah Khan <[email protected]>

Signed-off-by: Shuah Khan <[email protected]>
Signed-off-by: Stephen M. Cameron <[email protected]>
---
 drivers/scsi/hpsa.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 4f33806..3b4d195 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1405,6 +1405,11 @@ static void hpsa_map_one(struct pci_dev *pdev,
        }
 
        addr64 = (u64) pci_map_single(pdev, buf, buflen, data_direction);
+       if (dma_mapping_error(&pdev->dev, addr64)) {
+               cp->Header.SGList = 0;
+               cp->Header.SGTotal = 0;
+               return;
+       }
        cp->SG[0].Addr.lower =
          (u32) (addr64 & (u64) 0x00000000FFFFFFFF);
        cp->SG[0].Addr.upper =

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to