浏览代码

arm: imx: Zero entire imxdma structure

The semantic match that finds the problem:
// <smpl>
@@
type T;
identifier x;
@@

T *x;
...
* memset(x, ..., ... * sizeof(x) * ...);
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ilia Mirkin 14 年之前
父节点
当前提交
f7fdaca910
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/arm/mach-imx/dma-v1.c

+ 1 - 1
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 */