linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / bluetooth / hidp / core.c
index c6e3a2c..cdb9cfa 100644 (file)
@@ -20,6 +20,7 @@
    SOFTWARE IS DISCLAIMED.
 */
 
+#include <linux/config.h>
 #include <linux/module.h>
 
 #include <linux/types.h>
@@ -582,9 +583,10 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
                        bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->dst))
                return -ENOTUNIQ;
 
-       session = kzalloc(sizeof(struct hidp_session), GFP_KERNEL);
+       session = kmalloc(sizeof(struct hidp_session), GFP_KERNEL);
        if (!session)
                return -ENOMEM;
+       memset(session, 0, sizeof(struct hidp_session));
 
        session->input = input_allocate_device();
        if (!session->input) {