aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorvignesh babu <vignesh.babu@wipro.com>2007-04-17 15:42:09 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-21 18:29:17 -0400
commit2e6679a0aa352e6b74f6385c49cd4dca3dc7201f (patch)
treeef922abc304fc22b9c319e6ab4dc6e2e524a715f /drivers
parent0f851021c0f91e5073fa89f26b5ac68e23df8e11 (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sbus/char/vfc_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 8bfb67ccdcd4..c3135e2fbd5a 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -259,11 +259,10 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
259 if (copy_from_user(&inout, argp, sizeof(inout))) 259 if (copy_from_user(&inout, argp, sizeof(inout)))
260 return -EFAULT; 260 return -EFAULT;
261 261
262 buffer = kmalloc(inout.len, GFP_KERNEL); 262 buffer = kzalloc(inout.len, GFP_KERNEL);
263 if (buffer == NULL) 263 if (buffer == NULL)
264 return -ENOMEM; 264 return -ENOMEM;
265 265
266 memset(buffer,0,inout.len);
267 vfc_lock_device(dev); 266 vfc_lock_device(dev);
268 inout.ret= 267 inout.ret=
269 vfc_i2c_recvbuf(dev,inout.addr & 0xff 268 vfc_i2c_recvbuf(dev,inout.addr & 0xff