mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 01:04:36 -05:00
HID: Use vzalloc for vmalloc/memset(,0...)
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user