aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/hil_ptr.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-14 00:09:16 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-14 00:09:16 -0500
commitb39787a972042ded183343b177d9c595b5704575 (patch)
treeff0336c45ff4f8bbb3e64af5cc16bcfe75fbb54b /drivers/input/mouse/hil_ptr.c
parent493a7e0d5614c30e1f3e56d59ab774300a2609f2 (diff)
Input: use kzalloc() throughout the code
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/hil_ptr.c')
-rw-r--r--drivers/input/mouse/hil_ptr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/mouse/hil_ptr.c b/drivers/input/mouse/hil_ptr.c
index c2bf2ed07dc6..798f4a3ad7d2 100644
--- a/drivers/input/mouse/hil_ptr.c
+++ b/drivers/input/mouse/hil_ptr.c
@@ -245,10 +245,11 @@ static int hil_ptr_connect(struct serio *serio, struct serio_driver *driver)
245 unsigned int i, naxsets, btntype; 245 unsigned int i, naxsets, btntype;
246 uint8_t did, *idd; 246 uint8_t did, *idd;
247 247
248 if (!(ptr = kmalloc(sizeof(struct hil_ptr), GFP_KERNEL))) return -ENOMEM; 248 if (!(ptr = kzalloc(sizeof(struct hil_ptr), GFP_KERNEL)))
249 memset(ptr, 0, sizeof(struct hil_ptr)); 249 return -ENOMEM;
250 250
251 if (serio_open(serio, driver)) goto bail0; 251 if (serio_open(serio, driver))
252 goto bail0;
252 253
253 serio_set_drvdata(serio, ptr); 254 serio_set_drvdata(serio, ptr);
254 ptr->serio = serio; 255 ptr->serio = serio;