summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/userio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio/userio.c')
-rw-r--r--drivers/input/serio/userio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/userio.c b/drivers/input/serio/userio.c
index 9ab5c45c3a9f..a88e2eee55c3 100644
--- a/drivers/input/serio/userio.c
+++ b/drivers/input/serio/userio.c
@@ -77,7 +77,7 @@ static int userio_char_open(struct inode *inode, struct file *file)
{
struct userio_device *userio;
- userio = kzalloc(sizeof(struct userio_device), GFP_KERNEL);
+ userio = kzalloc(sizeof(*userio), GFP_KERNEL);
if (!userio)
return -ENOMEM;
@@ -85,7 +85,7 @@ static int userio_char_open(struct inode *inode, struct file *file)
spin_lock_init(&userio->buf_lock);
init_waitqueue_head(&userio->waitq);
- userio->serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
+ userio->serio = kzalloc(sizeof(*userio->serio), GFP_KERNEL);
if (!userio->serio) {
kfree(userio);
return -ENOMEM;