lkml.org 
[lkml]   [2010]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/49] drivers/hid: Use vzalloc
Date
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/hid/hid-core.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 515345b..3fd8e5a 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -652,13 +652,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;
--
1.7.3.1.g432b3.dirty


\
 
 \ /
  Last update: 2010-11-05 04:21    [W:0.020 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site