From: Markus Pargmann Date: Sun, 26 May 2013 09:53:21 +0000 (+0200) Subject: DMA: imx-dma: imxdma->dev used uninitialized X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c6b3e7725384f02418d80e7dc32b1a690497004;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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;