diff options
Diffstat (limited to 'net/bluetooth/hidp/core.c')
-rw-r--r-- | net/bluetooth/hidp/core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 29544c21f4b5..2429ca2d7b06 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -157,7 +157,8 @@ static int hidp_queue_event(struct hidp_session *session, struct input_dev *dev, | |||
157 | 157 | ||
158 | session->leds = newleds; | 158 | session->leds = newleds; |
159 | 159 | ||
160 | if (!(skb = alloc_skb(3, GFP_ATOMIC))) { | 160 | skb = alloc_skb(3, GFP_ATOMIC); |
161 | if (!skb) { | ||
161 | BT_ERR("Can't allocate memory for new frame"); | 162 | BT_ERR("Can't allocate memory for new frame"); |
162 | return -ENOMEM; | 163 | return -ENOMEM; |
163 | } | 164 | } |
@@ -250,7 +251,8 @@ static int __hidp_send_ctrl_message(struct hidp_session *session, | |||
250 | 251 | ||
251 | BT_DBG("session %p data %p size %d", session, data, size); | 252 | BT_DBG("session %p data %p size %d", session, data, size); |
252 | 253 | ||
253 | if (!(skb = alloc_skb(size + 1, GFP_ATOMIC))) { | 254 | skb = alloc_skb(size + 1, GFP_ATOMIC); |
255 | if (!skb) { | ||
254 | BT_ERR("Can't allocate memory for new frame"); | 256 | BT_ERR("Can't allocate memory for new frame"); |
255 | return -ENOMEM; | 257 | return -ENOMEM; |
256 | } | 258 | } |
@@ -283,7 +285,8 @@ static int hidp_queue_report(struct hidp_session *session, | |||
283 | 285 | ||
284 | BT_DBG("session %p hid %p data %p size %d", session, session->hid, data, size); | 286 | BT_DBG("session %p hid %p data %p size %d", session, session->hid, data, size); |
285 | 287 | ||
286 | if (!(skb = alloc_skb(size + 1, GFP_ATOMIC))) { | 288 | skb = alloc_skb(size + 1, GFP_ATOMIC); |
289 | if (!skb) { | ||
287 | BT_ERR("Can't allocate memory for new frame"); | 290 | BT_ERR("Can't allocate memory for new frame"); |
288 | return -ENOMEM; | 291 | return -ENOMEM; |
289 | } | 292 | } |
@@ -1016,8 +1019,6 @@ static int __init hidp_init(void) | |||
1016 | { | 1019 | { |
1017 | int ret; | 1020 | int ret; |
1018 | 1021 | ||
1019 | l2cap_load(); | ||
1020 | |||
1021 | BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION); | 1022 | BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION); |
1022 | 1023 | ||
1023 | ret = hid_register_driver(&hidp_driver); | 1024 | ret = hid_register_driver(&hidp_driver); |