Skip to content

Commit

Permalink
DMA: imx-dma: imxdma->dev used uninitialized
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Pargmann authored and Vinod Koul committed Jul 5, 2013
1 parent 290ad0f commit 5c6b3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/imx-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5c6b3e7

Please sign in to comment.