提交 eceaae18 编写于 作者: S Shuah Khan 提交者: James Bottomley

[SCSI] hpsa: Check for dma_mapping_error in hpsa_map_one

Signed-off-by: NShuah Khan <shuah.khan@hp.com>
Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 208afec4
......@@ -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 =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册