From f43afb1e21ff31243e120401ff34f017d0818998 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 18 Mar 2013 08:21:33 -0300 Subject: [PATCH] [media] solo6x10: add call to pci_dma_mapping_error Check the result of the dma mapping. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/solo6x10/p2m.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/solo6x10/p2m.c b/drivers/staging/media/solo6x10/p2m.c index b3a933906b90..a77c8d9ed0bf 100644 --- a/drivers/staging/media/solo6x10/p2m.c +++ b/drivers/staging/media/solo6x10/p2m.c @@ -52,6 +52,8 @@ int solo_p2m_dma(struct solo_dev *solo_dev, int wr, dma_addr = pci_map_single(solo_dev->pdev, sys_addr, size, wr ? PCI_DMA_TODEVICE : PCI_DMA_FROMDEVICE); + if (pci_dma_mapping_error(solo_dev->pdev, dma_addr)) + return -ENOMEM; ret = solo_p2m_dma_t(solo_dev, wr, dma_addr, ext_addr, size, repeat, ext_size); -- 2.20.1