From: Joe Perches Date: Fri, 10 Dec 2010 03:29:04 +0000 (-0800) Subject: HID: Use vzalloc for vmalloc/memset(,0...) X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fe2580204d8bbcd18540736a283ed0b784c6a024;p=linux-beck.git HID: Use vzalloc for vmalloc/memset(,0...) Signed-off-by: Joe Perches Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 1fd5e331fa8d..5ddace093f0f 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;