From: Markus Pargmann Date: Sun, 26 May 2013 09:53:21 +0000 (+0200) Subject: DMA: imx-dma: imxdma->dev used uninitialized X-Git-Tag: next-20130617~70^2~3^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=42276163b4c546a0342366a886ef5c1a6a5eee7b;p=karo-tx-linux.git DMA: imx-dma: imxdma->dev used uninitialized imxdma->dev is used for dev_warn before it was set. Signed-off-by: Markus Pargmann Reviewed-by: Shawn Guo Acked-by: Sascha Hauer Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 34c54cf08231..ff2aab973b45 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -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;