]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/char/keyboard.c
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[net-next-2.6.git] / drivers / char / keyboard.c
index bf2339c869ea2fd7dcfcb9be79ba940a88e76cfe..ca234ce8004ab040bf4f797cda3b9ae292c4ed7a 100644 (file)
@@ -1297,9 +1297,9 @@ static struct input_handle *kbd_connect(struct input_handler *handler,
        if (i == BTN_MISC && !test_bit(EV_SND, dev->evbit))
                return NULL;
 
-       if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
+       handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
+       if (!handle)
                return NULL;
-       memset(handle, 0, sizeof(struct input_handle));
 
        handle->dev = dev;
        handle->handler = handler;