aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hidp/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hidp/core.c')
-rw-r--r--net/bluetooth/hidp/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index b9c24a55425c..c6e3a2c27c6e 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -582,10 +582,9 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
582 bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->dst)) 582 bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->dst))
583 return -ENOTUNIQ; 583 return -ENOTUNIQ;
584 584
585 session = kmalloc(sizeof(struct hidp_session), GFP_KERNEL); 585 session = kzalloc(sizeof(struct hidp_session), GFP_KERNEL);
586 if (!session) 586 if (!session)
587 return -ENOMEM; 587 return -ENOMEM;
588 memset(session, 0, sizeof(struct hidp_session));
589 588
590 session->input = input_allocate_device(); 589 session->input = input_allocate_device();
591 if (!session->input) { 590 if (!session->input) {