Skip to content

Commit

Permalink
[SBUS] vfc_dev.c: kzalloc
Browse files Browse the repository at this point in the history
Replacing kmalloc/memset combination with kzalloc.

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
vignesh babu authored and David S. Miller committed Apr 21, 2007
1 parent 0f85102 commit 2e6679a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/sbus/char/vfc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e6679a

Please sign in to comment.