diff options
Diffstat (limited to 'net/bluetooth/cmtp/capi.c')
-rw-r--r-- | net/bluetooth/cmtp/capi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index 6fb47e00e188..be04e9fb11f6 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c | |||
@@ -75,15 +75,13 @@ | |||
75 | 75 | ||
76 | static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl) | 76 | static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl) |
77 | { | 77 | { |
78 | struct cmtp_application *app = kmalloc(sizeof(*app), GFP_KERNEL); | 78 | struct cmtp_application *app = kzalloc(sizeof(*app), GFP_KERNEL); |
79 | 79 | ||
80 | BT_DBG("session %p application %p appl %d", session, app, appl); | 80 | BT_DBG("session %p application %p appl %d", session, app, appl); |
81 | 81 | ||
82 | if (!app) | 82 | if (!app) |
83 | return NULL; | 83 | return NULL; |
84 | 84 | ||
85 | memset(app, 0, sizeof(*app)); | ||
86 | |||
87 | app->state = BT_OPEN; | 85 | app->state = BT_OPEN; |
88 | app->appl = appl; | 86 | app->appl = appl; |
89 | 87 | ||