Message ID | 049252dc8476fd9bad62ab7788b534ee5d1e6b18.1291951482.git.joe@perches.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 2f410ae..ff43b4a 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;