aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dm1105
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-10-24 06:13:23 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 17:53:24 -0200
commit7b51a70cbf0c9995caf59f7126d251e14a9e0686 (patch)
tree9413bf6ffbc736a751a338db4da3ad9d05792f9b /drivers/media/dvb/dm1105
parent20dafb3b0696471cfaa3e2fc2769516ebda3daf9 (diff)
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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dm1105')
-rw-r--r--drivers/media/dvb/dm1105/dm1105.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c
index 5c16437d989..f48f73aff19 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -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)