From: Hans Verkuil <hans.verk...@cisco.com> Check the result of the dma mapping.
Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> --- 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 3ed4d58..2292061 100644 --- a/drivers/staging/media/solo6x10/p2m.c +++ b/drivers/staging/media/solo6x10/p2m.c @@ -51,6 +51,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); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html