Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;