usb: dwc2: Print error if unable to set DMA coherent mask
authorStefan Wahren <stefan.wahren@i2se.com>
Mon, 12 Feb 2018 20:20:08 +0000 (21:20 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 13 Mar 2018 08:47:46 +0000 (10:47 +0200)
We better print an error in case probing of dwc2 fails on
setting the DMA coherent mask.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/platform.c

index 9f39b15..65e1af5 100644 (file)
@@ -382,8 +382,10 @@ static int dwc2_driver_probe(struct platform_device *dev)
        if (!dev->dev.dma_mask)
                dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
        retval = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(32));
-       if (retval)
+       if (retval) {
+               dev_err(&dev->dev, "can't set coherent DMA mask: %d\n", retval);
                return retval;
+       }
 
        res = platform_get_resource(dev, IORESOURCE_MEM, 0);
        hsotg->regs = devm_ioremap_resource(&dev->dev, res);