From: Dmitry Torokhov Date: Sat, 5 Aug 2006 02:51:51 +0000 (-0400) Subject: Input: keyboard - change to use kzalloc X-Git-Tag: v2.6.18-rc4~1^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22479e1c0d111c60d29a4759408394cbdc7548a5;p=linux-2.6 Input: keyboard - change to use kzalloc Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 30a745428a..3e90aac375 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -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;