mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
[SCSI] hpsa: Check for dma_mapping_error in hpsa_map_one
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>
This commit is contained in:
parent
208afec4f3
commit
eceaae187d
1 changed files with 5 additions and 0 deletions
|
@ -1405,6 +1405,11 @@ static void hpsa_map_one(struct pci_dev *pdev,
|
||||||
}
|
}
|
||||||
|
|
||||||
addr64 = (u64) pci_map_single(pdev, buf, buflen, data_direction);
|
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 =
|
cp->SG[0].Addr.lower =
|
||||||
(u32) (addr64 & (u64) 0x00000000FFFFFFFF);
|
(u32) (addr64 & (u64) 0x00000000FFFFFFFF);
|
||||||
cp->SG[0].Addr.upper =
|
cp->SG[0].Addr.upper =
|
||||||
|
|
Loading…
Add table
Reference in a new issue