aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mousedev.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-14 00:09:16 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-14 00:09:16 -0500
commitb39787a972042ded183343b177d9c595b5704575 (patch)
treeff0336c45ff4f8bbb3e64af5cc16bcfe75fbb54b /drivers/input/mousedev.c
parent493a7e0d5614c30e1f3e56d59ab774300a2609f2 (diff)
Input: use kzalloc() throughout the code
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mousedev.c')
-rw-r--r--drivers/input/mousedev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 9abed18d2ecf..b685a507955d 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -412,9 +412,8 @@ static int mousedev_open(struct inode * inode, struct file * file)
412 if (i >= MOUSEDEV_MINORS || !mousedev_table[i]) 412 if (i >= MOUSEDEV_MINORS || !mousedev_table[i])
413 return -ENODEV; 413 return -ENODEV;
414 414
415 if (!(list = kmalloc(sizeof(struct mousedev_list), GFP_KERNEL))) 415 if (!(list = kzalloc(sizeof(struct mousedev_list), GFP_KERNEL)))
416 return -ENOMEM; 416 return -ENOMEM;
417 memset(list, 0, sizeof(struct mousedev_list));
418 417
419 spin_lock_init(&list->packet_lock); 418 spin_lock_init(&list->packet_lock);
420 list->pos_x = xres / 2; 419 list->pos_x = xres / 2;
@@ -626,9 +625,8 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
626 return NULL; 625 return NULL;
627 } 626 }
628 627
629 if (!(mousedev = kmalloc(sizeof(struct mousedev), GFP_KERNEL))) 628 if (!(mousedev = kzalloc(sizeof(struct mousedev), GFP_KERNEL)))
630 return NULL; 629 return NULL;
631 memset(mousedev, 0, sizeof(struct mousedev));
632 630
633 INIT_LIST_HEAD(&mousedev->list); 631 INIT_LIST_HEAD(&mousedev->list);
634 init_waitqueue_head(&mousedev->wait); 632 init_waitqueue_head(&mousedev->wait);