mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
[SBUS] vfc_dev.c: kzalloc
Replacing kmalloc/memset combination with kzalloc. Signed-off-by: vignesh babu <vignesh.babu@wipro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0f851021c0
commit
2e6679a0aa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user