Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

DMA: imx-dma: imxdma->dev used uninitialized

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>

authored by

Markus Pargmann and committed by
Vinod Koul
5c6b3e77 290ad0f9

+1 -1
+1 -1
drivers/dma/imx-dma.c
··· 1067 1067 if (!imxdma) 1068 1068 return -ENOMEM; 1069 1069 1070 + imxdma->dev = &pdev->dev; 1070 1071 imxdma->devtype = pdev->id_entry->driver_data; 1071 1072 1072 1073 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ··· 1172 1171 &imxdma->dma_device.channels); 1173 1172 } 1174 1173 1175 - imxdma->dev = &pdev->dev; 1176 1174 imxdma->dma_device.dev = &pdev->dev; 1177 1175 1178 1176 imxdma->dma_device.device_alloc_chan_resources = imxdma_alloc_chan_resources;