dmaengine: fsl-edma: print error code in error messages.
authorPeter Griffin <peter.griffin@linaro.org>
Tue, 7 Jun 2016 17:38:35 +0000 (18:38 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 21 Jun 2016 16:04:59 +0000 (21:34 +0530)
It is useful to print the error code as part of the error
message.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/fsl-edma.c

index 7208fc906ac1e9bf77abe147fcb323efbe268249..cc06eeaef1a7a213cddfdb7ab330719429c99328 100644 (file)
@@ -963,14 +963,16 @@ static int fsl_edma_probe(struct platform_device *pdev)
 
        ret = dma_async_device_register(&fsl_edma->dma_dev);
        if (ret) {
-               dev_err(&pdev->dev, "Can't register Freescale eDMA engine.\n");
+               dev_err(&pdev->dev,
+                       "Can't register Freescale eDMA engine. (%d)\n", ret);
                fsl_disable_clocks(fsl_edma);
                return ret;
        }
 
        ret = of_dma_controller_register(np, fsl_edma_xlate, fsl_edma);
        if (ret) {
-               dev_err(&pdev->dev, "Can't register Freescale eDMA of_dma.\n");
+               dev_err(&pdev->dev,
+                       "Can't register Freescale eDMA of_dma. (%d)\n", ret);
                dma_async_device_unregister(&fsl_edma->dma_dev);
                fsl_disable_clocks(fsl_edma);
                return ret;