提交 7b51a70c 编写于 作者: F FUJITA Tomonori 提交者: Mauro Carvalho Chehab

V4L/DVB (9472): dm1105: fix the misuse of pci_dma_mapping_error

pci_dma_mapping_error can't be used for pci_alloc_consistent
(pci_dma_mapping_error is for dma_map_single and dma_map_page).
pci_alloc_consistent returns NULL if the allocation fails.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: NIgor M. Liplianin <liplianin@me.by>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 20dafb3b
......@@ -367,7 +367,7 @@ static int __devinit dm1105dvb_dma_map(struct dm1105dvb *dm1105dvb)
{
dm1105dvb->ts_buf = pci_alloc_consistent(dm1105dvb->pdev, 6*DM1105_DMA_BYTES, &dm1105dvb->dma_addr);
return pci_dma_mapping_error(dm1105dvb->pdev, dm1105dvb->dma_addr);
return !dm1105dvb->ts_buf;
}
static void dm1105dvb_dma_unmap(struct dm1105dvb *dm1105dvb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册