提交 fe258020 编写于 作者: J Joe Perches 提交者: Jiri Kosina

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

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 4291ee30
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册