diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
commit | ef2e58ea6b9931c3a4816c66593da49bb20e3b24 (patch) | |
tree | ce7432add3becbe78de4ea06425cd2d9e91f4ada /drivers/sbus/char/vfc_dev.c | |
parent | 06d63cc51d47f572009138a7f3ac34d95773405d (diff) | |
parent | de46c33745f5e2ad594c72f2cf5f490861b16ce1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/sbus/char/vfc_dev.c')
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 3 |
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 |