media: coda/imx-vdoa: Handle dma_set_coherent_mask error codes
[sfrench/cifs-2.6.git] / drivers / media / platform / coda / imx-vdoa.c
index 6996d4571e3638a98fc163d55b018d06c3e69d54..00643f37b3e6fff15db0d33cf7185492f6b80471 100644 (file)
@@ -287,7 +287,11 @@ static int vdoa_probe(struct platform_device *pdev)
        struct resource *res;
        int ret;
 
-       dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+       ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+       if (ret) {
+               dev_err(&pdev->dev, "DMA enable failed\n");
+               return ret;
+       }
 
        vdoa = devm_kzalloc(&pdev->dev, sizeof(*vdoa), GFP_KERNEL);
        if (!vdoa)