Input: use kzalloc() throughout the code

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Eric Sesterhenn
2006-03-14 00:09:16 -05:00
committed by Dmitry Torokhov
parent 493a7e0d56
commit b39787a972
13 changed files with 22 additions and 40 deletions

View File

@ -245,10 +245,11 @@ static int hil_ptr_connect(struct serio *serio, struct serio_driver *driver)
unsigned int i, naxsets, btntype;
uint8_t did, *idd;
if (!(ptr = kmalloc(sizeof(struct hil_ptr), GFP_KERNEL))) return -ENOMEM;
memset(ptr, 0, sizeof(struct hil_ptr));
if (!(ptr = kzalloc(sizeof(struct hil_ptr), GFP_KERNEL)))
return -ENOMEM;
if (serio_open(serio, driver)) goto bail0;
if (serio_open(serio, driver))
goto bail0;
serio_set_drvdata(serio, ptr);
ptr->serio = serio;