From: Markus Pargmann Date: Sun, 26 May 2013 09:53:21 +0000 (+0200) Subject: DMA: imx-dma: imxdma->dev used uninitialized X-Git-Tag: upstream/snapshot3+hdmi~4764^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c6b3e7725384f02418d80e7dc32b1a690497004;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 34c54cf..ff2aab9 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;