summaryrefslogtreecommitdiffstats
path: root/drivers/input/joydev.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-04-03 15:08:57 +0200
committerSteven Whitehouse <swhiteho@redhat.com>2006-04-03 15:08:57 +0200
commit76467874b83835129dc454e3a7a8e5d1186101b0 (patch)
tree162129f0c36c35be4aa323cf00626db0e804c3fc /drivers/input/joydev.c
parent[GFS2] Update GFS2 for the recent pull from Linus (diff)
parentLinux v2.6.17-rc1 (diff)
downloadlinux-76467874b83835129dc454e3a7a8e5d1186101b0.tar.xz
linux-76467874b83835129dc454e3a7a8e5d1186101b0.zip
Merge branch 'master'
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r--drivers/input/joydev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 20e2972b9204..949bdcef8c2b 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -171,9 +171,8 @@ static int joydev_open(struct inode *inode, struct file *file)
if (i >= JOYDEV_MINORS || !joydev_table[i])
return -ENODEV;
- if (!(list = kmalloc(sizeof(struct joydev_list), GFP_KERNEL)))
+ if (!(list = kzalloc(sizeof(struct joydev_list), GFP_KERNEL)))
return -ENOMEM;
- memset(list, 0, sizeof(struct joydev_list));
list->joydev = joydev_table[i];
list_add_tail(&list->node, &joydev_table[i]->list);
@@ -457,9 +456,8 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
return NULL;
}
- if (!(joydev = kmalloc(sizeof(struct joydev), GFP_KERNEL)))
+ if (!(joydev = kzalloc(sizeof(struct joydev), GFP_KERNEL)))
return NULL;
- memset(joydev, 0, sizeof(struct joydev));
INIT_LIST_HEAD(&joydev->list);
init_waitqueue_head(&joydev->wait);