diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 17:52:52 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 17:52:52 -0400 |
| commit | 32ea89ecb25789b1b7db28146558587a42f3b372 (patch) | |
| tree | c5b3b33523b353f2eab2d8dcd2b3f069826cdc48 /drivers/input/tsdev.c | |
| parent | 58a7ce64426394a46e80cdc9440cc1e7c195e85d (diff) | |
| parent | a145410dccdb44f81d3b56763ef9b6f721f4e47c (diff) | |
Merge branch 'master'
Diffstat (limited to 'drivers/input/tsdev.c')
| -rw-r--r-- | drivers/input/tsdev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index ca1547929d62..d678d144bbf8 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
| @@ -157,9 +157,8 @@ static int tsdev_open(struct inode *inode, struct file *file) | |||
| 157 | if (i >= TSDEV_MINORS || !tsdev_table[i & TSDEV_MINOR_MASK]) | 157 | if (i >= TSDEV_MINORS || !tsdev_table[i & TSDEV_MINOR_MASK]) |
| 158 | return -ENODEV; | 158 | return -ENODEV; |
| 159 | 159 | ||
| 160 | if (!(list = kmalloc(sizeof(struct tsdev_list), GFP_KERNEL))) | 160 | if (!(list = kzalloc(sizeof(struct tsdev_list), GFP_KERNEL))) |
| 161 | return -ENOMEM; | 161 | return -ENOMEM; |
| 162 | memset(list, 0, sizeof(struct tsdev_list)); | ||
| 163 | 162 | ||
| 164 | list->raw = (i >= TSDEV_MINORS/2) ? 1 : 0; | 163 | list->raw = (i >= TSDEV_MINORS/2) ? 1 : 0; |
| 165 | 164 | ||
| @@ -379,9 +378,8 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
| 379 | return NULL; | 378 | return NULL; |
| 380 | } | 379 | } |
| 381 | 380 | ||
| 382 | if (!(tsdev = kmalloc(sizeof(struct tsdev), GFP_KERNEL))) | 381 | if (!(tsdev = kzalloc(sizeof(struct tsdev), GFP_KERNEL))) |
| 383 | return NULL; | 382 | return NULL; |
| 384 | memset(tsdev, 0, sizeof(struct tsdev)); | ||
| 385 | 383 | ||
| 386 | INIT_LIST_HEAD(&tsdev->list); | 384 | INIT_LIST_HEAD(&tsdev->list); |
| 387 | init_waitqueue_head(&tsdev->wait); | 385 | init_waitqueue_head(&tsdev->wait); |
