Input: use kzalloc() throughout the code

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Eric Sesterhenn
2006-03-14 00:09:16 -05:00
committed by Dmitry Torokhov
parent 493a7e0d56
commit b39787a972
13 changed files with 22 additions and 40 deletions

View File

@@ -157,9 +157,8 @@ static int tsdev_open(struct inode *inode, struct file *file)
if (i >= TSDEV_MINORS || !tsdev_table[i & TSDEV_MINOR_MASK])
return -ENODEV;
if (!(list = kmalloc(sizeof(struct tsdev_list), GFP_KERNEL)))
if (!(list = kzalloc(sizeof(struct tsdev_list), GFP_KERNEL)))
return -ENOMEM;
memset(list, 0, sizeof(struct tsdev_list));
list->raw = (i >= TSDEV_MINORS/2) ? 1 : 0;
@@ -379,9 +378,8 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
return NULL;
}
if (!(tsdev = kmalloc(sizeof(struct tsdev), GFP_KERNEL)))
if (!(tsdev = kzalloc(sizeof(struct tsdev), GFP_KERNEL)))
return NULL;
memset(tsdev, 0, sizeof(struct tsdev));
INIT_LIST_HEAD(&tsdev->list);
init_waitqueue_head(&tsdev->wait);