linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: arm/imx: fix memory init in imx_dma_request()
@ 2010-10-10 17:28 Vasiliy Kulikov
  2010-10-10 19:44 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Vasiliy Kulikov @ 2010-10-10 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

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

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
 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(-)

diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c
index 3e8c47c..b5cc027 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 */
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] arch: arm/imx: fix memory init in imx_dma_request()
  2010-10-10 17:28 [PATCH] arch: arm/imx: fix memory init in imx_dma_request() Vasiliy Kulikov
@ 2010-10-10 19:44 ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2010-10-10 19:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 10, 2010 at 09:28:23PM +0400, Vasiliy Kulikov wrote:
> imx_dma_request() didn't fill struct pointed by imxdma with zeroes
> as it passed sizeof(pointer), not sizeof(struct) to memset().
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-and-tested-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-10 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-10 17:28 [PATCH] arch: arm/imx: fix memory init in imx_dma_request() Vasiliy Kulikov
2010-10-10 19:44 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).