Skip to content

Commit

Permalink
[SCSI] hpsa: Check for dma_mapping_error in hpsa_map_one
Browse files Browse the repository at this point in the history
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Shuah Khan authored and James Bottomley committed Feb 24, 2013
1 parent 208afec commit eceaae1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit eceaae1

Please sign in to comment.