From bf59cb1843c1a38b863aded00202b089a71c0653 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 3 Sep 2010 16:03:58 +0530 Subject: [arm/tegra]: Allocating dma action memory with zero init. In NvRmDmaStartDmaTransfer(), the memory is allocated for the dma action. The allocated memory does not get initialized and so uninitialized member unintentionally changing the behavior of dma. Allocating memory with zero initialized. bug 728661 (cherry picked from commit ac036af2c9599c419c12a8ba1c4309a9d8364b21) Change-Id: Ie36db6ad88eb9a9870f53b2c685eed6888decaf9 Reviewed-on: http://git-master.nvidia.com/r/6052 Reviewed-by: Laxman Dewangan Tested-by: Laxman Dewangan Reviewed-by: Bharat Nihalani --- arch/arm/mach-tegra/nvrm/io/common/nvrm_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/nvrm/io/common/nvrm_dma.c b/arch/arm/mach-tegra/nvrm/io/common/nvrm_dma.c index 03597ec08709..0734dc9dda18 100644 --- a/arch/arm/mach-tegra/nvrm/io/common/nvrm_dma.c +++ b/arch/arm/mach-tegra/nvrm/io/common/nvrm_dma.c @@ -236,7 +236,7 @@ NvError NvRmDmaStartDmaTransfer(NvRmDmaHandle dma, NvRmDmaClientBuffer *b, return NvError_NotSupported; } - action = kmalloc(sizeof(*action), GFP_KERNEL); + action = kzalloc(sizeof(*action), GFP_KERNEL); if (!action) { pr_debug("%s: insufficient memory\n", __func__); return NvError_InsufficientMemory; -- cgit v1.2.3