Skip to contentSkip to conversation

arch: arm/imx: fix memory init in imx_dma_request()

PATCH In review Vasiliy Kulikov 2 participants 2 messages Oct 10, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: arm/imx: fix memory init in imx_dma_request()

imx_dma_request() didn't fill struct pointed by imxdma with zeroes as it passed sizeof(pointer), not sizeof(struct) to memset().

---
I cannot compile this driver, so it is not tested.

 arch/arm/mach-imx/dma-v1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-imx/dma-v1.c +1 -1
index 3e8c47c..b5cc027 100644
@@ -699,7 +699,7 @@ int imx_dma_request(int channel, const char *name)
 		local_irq_restore(flags);
 		return -EBUSY;
 	}
-	memset(imxdma, 0, sizeof(imxdma));
+	memset(imxdma, 0, sizeof(*imxdma));
 	imxdma->name = name;
 	local_irq_restore(flags); /* request_irq() can block */
 
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 4 lines · Vasiliy Kulikov

imx_dma_request() didn't fill struct pointed by imxdma with zeroes as it passed sizeof(pointer), not sizeof(struct) to memset().

Thanks
Uwe

Signature · 6 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html