]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i2c: at91: print error messages in case of failed dma_request_slave_channel_reason()
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 3 Jun 2015 06:10:47 +0000 (08:10 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 3 Jun 2015 06:10:47 +0000 (08:10 +0200)
drivers/i2c/busses/i2c-at91.c

index 6011bd4136a452bd8c75bf03a19f5b7922b25006..0353599f2fdac455d2874f2fbe003a12c96d03f3 100644 (file)
@@ -643,6 +643,7 @@ static int at91_twi_configure_dma(struct at91_twi_dev *dev, u32 phy_addr)
        dma->chan_tx = dma_request_slave_channel_reason(dev->dev, "tx");
        if (IS_ERR(dma->chan_tx)) {
                ret = PTR_ERR(dma->chan_tx);
+               dev_err(dev->dev, "Failed to get tx DMA: %d\n", ret);
                dma->chan_tx = NULL;
                goto error;
        }
@@ -650,6 +651,7 @@ static int at91_twi_configure_dma(struct at91_twi_dev *dev, u32 phy_addr)
        dma->chan_rx = dma_request_slave_channel_reason(dev->dev, "rx");
        if (IS_ERR(dma->chan_rx)) {
                ret = PTR_ERR(dma->chan_rx);
+               dev_err(dev->dev, "Failed to get rx DMA: %d\n", ret);
                dma->chan_rx = NULL;
                goto error;
        }