summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-10-24 09:13:23 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-24 09:13:23 +0000
commitdec32b6f66df644e81cc7fba05f7ed7f6d4316cd (patch)
tree09dc2ae3e5f6118504ffda73152689ba0e7e94b1 /linux/drivers/media/dvb
parent1813bac623f51df9f0d329a3470cb942cf602b8c (diff)
downloadmediapointer-dvb-s2-dec32b6f66df644e81cc7fba05f7ed7f6d4316cd.tar.gz
mediapointer-dvb-s2-dec32b6f66df644e81cc7fba05f7ed7f6d4316cd.tar.bz2
dm1105: fix the misuse of pci_dma_mapping_error
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> 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. Acked-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/dm1105/dm1105.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/dm1105/dm1105.c b/linux/drivers/media/dvb/dm1105/dm1105.c
index 19daa752f..f578cbdb6 100644
--- a/linux/drivers/media/dvb/dm1105/dm1105.c
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c
@@ -367,11 +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);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
- return pci_dma_mapping_error(dm1105dvb->dma_addr);
-#else
- return pci_dma_mapping_error(dm1105dvb->pdev, dm1105dvb->dma_addr);
-#endif
+ return !dm1105dvb->ts_buf;
}
static void dm1105dvb_dma_unmap(struct dm1105dvb *dm1105dvb)