From f7fdaca910e6bc13659ecdffc28c97938b752e01 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 20 Feb 2011 17:10:51 -0500 Subject: [PATCH] arm: imx: Zero entire imxdma structure The semantic match that finds the problem: // @@ type T; identifier x; @@ T *x; ... * memset(x, ..., ... * sizeof(x) * ...); // Signed-off-by: Ilia Mirkin Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/dma-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index e9f1769..236f149 100644 --- a/arch/arm/mach-imx/dma-v1.c +++ b/arch/arm/mach-imx/dma-v1.c @@ -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 */ -- 2.7.4