]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/dwc2/platform.c
Merge branch 'for-3.13/core' of git://git.kernel.dk/linux-block
[~andy/linux] / drivers / staging / dwc2 / platform.c
index 44cce2fa6361194a36ac72dff5825575fd324bf5..83ca1053bb1d2c04be6eeef97103ae1bf6bfd58f 100644 (file)
@@ -100,13 +100,14 @@ static int dwc2_driver_probe(struct platform_device *dev)
         */
        if (!dev->dev.dma_mask)
                dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
-       if (!dev->dev.coherent_dma_mask)
-               dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+       retval = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(32));
+       if (retval)
+               return retval;
 
        irq = platform_get_irq(dev, 0);
        if (irq < 0) {
                dev_err(&dev->dev, "missing IRQ resource\n");
-               return -EINVAL;
+               return irq;
        }
 
        res = platform_get_resource(dev, IORESOURCE_MEM, 0);