aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJoe Perches2010-12-09 19:29:04 -0800
committerJiri Kosina2010-12-10 15:11:31 +0100
commitfe2580204d8bbcd18540736a283ed0b784c6a024 (patch)
tree706363fb5fc7e54b9453a242a167626f4edaf601 /drivers/hid
parent4291ee305e9bb0699504a66f0e2b7aefcf0512a5 (diff)
HID: Use vzalloc for vmalloc/memset(,0...)
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 1fd5e331fa8d..5ddace093f0f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -654,13 +654,12 @@ int hid_parse_report(struct hid_device *device, __u8 *start,
return -ENOMEM;
device->rsize = size;
- parser = vmalloc(sizeof(struct hid_parser));
+ parser = vzalloc(sizeof(struct hid_parser));
if (!parser) {
ret = -ENOMEM;
goto err;
}
- memset(parser, 0, sizeof(struct hid_parser));
parser->device = device;
end = start + size;