Commit fe258020 authored by Joe Perches's avatar Joe Perches Committed by Jiri Kosina

HID: Use vzalloc for vmalloc/memset(,0...)

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 4291ee30
...@@ -654,13 +654,12 @@ int hid_parse_report(struct hid_device *device, __u8 *start, ...@@ -654,13 +654,12 @@ int hid_parse_report(struct hid_device *device, __u8 *start,
return -ENOMEM; return -ENOMEM;
device->rsize = size; device->rsize = size;
parser = vmalloc(sizeof(struct hid_parser)); parser = vzalloc(sizeof(struct hid_parser));
if (!parser) { if (!parser) {
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto err;
} }
memset(parser, 0, sizeof(struct hid_parser));
parser->device = device; parser->device = device;
end = start + size; end = start + size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment