]> Pileus Git - ~andy/linux/commitdiff
DMA: imx-dma: imxdma->dev used uninitialized
authorMarkus Pargmann <mpa@pengutronix.de>
Sun, 26 May 2013 09:53:21 +0000 (11:53 +0200)
committerVinod Koul <vinod.koul@intel.com>
Fri, 5 Jul 2013 06:10:27 +0000 (11:40 +0530)
imxdma->dev is used for dev_warn before it was set.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/imx-dma.c

index 34c54cf08231f8a0452ff0b1ebfb1d1102f3a766..ff2aab973b45dd1594fc5445380627589a1791c8 100644 (file)
@@ -1067,6 +1067,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
        if (!imxdma)
                return -ENOMEM;
 
+       imxdma->dev = &pdev->dev;
        imxdma->devtype = pdev->id_entry->driver_data;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1171,7 +1172,6 @@ static int __init imxdma_probe(struct platform_device *pdev)
                              &imxdma->dma_device.channels);
        }
 
-       imxdma->dev = &pdev->dev;
        imxdma->dma_device.dev = &pdev->dev;
 
        imxdma->dma_device.device_alloc_chan_resources = imxdma_alloc_chan_resources;