提交 2e6679a0 编写于 作者: V vignesh babu 提交者: David S. Miller

[SBUS] vfc_dev.c: kzalloc

Replacing kmalloc/memset combination with kzalloc.
Signed-off-by: Nvignesh babu <vignesh.babu@wipro.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0f851021
......@@ -259,11 +259,10 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
if (copy_from_user(&inout, argp, sizeof(inout)))
return -EFAULT;
buffer = kmalloc(inout.len, GFP_KERNEL);
buffer = kzalloc(inout.len, GFP_KERNEL);
if (buffer == NULL)
return -ENOMEM;
memset(buffer,0,inout.len);
vfc_lock_device(dev);
inout.ret=
vfc_i2c_recvbuf(dev,inout.addr & 0xff
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册