diff options
Diffstat (limited to 'net/bluetooth/a2mp.c')
-rw-r--r-- | net/bluetooth/a2mp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index be9640e9ca00..e09ea78356c3 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c | |||
@@ -388,9 +388,9 @@ static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, | |||
388 | hdev = hci_dev_get(req->id); | 388 | hdev = hci_dev_get(req->id); |
389 | if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) { | 389 | if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) { |
390 | struct a2mp_amp_assoc_rsp rsp; | 390 | struct a2mp_amp_assoc_rsp rsp; |
391 | rsp.id = req->id; | ||
392 | 391 | ||
393 | memset(&rsp, 0, sizeof(rsp)); | 392 | memset(&rsp, 0, sizeof(rsp)); |
393 | rsp.id = req->id; | ||
394 | 394 | ||
395 | if (tmp) { | 395 | if (tmp) { |
396 | rsp.status = A2MP_STATUS_COLLISION_OCCURED; | 396 | rsp.status = A2MP_STATUS_COLLISION_OCCURED; |
@@ -519,6 +519,7 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, | |||
519 | assoc = kmemdup(req->amp_assoc, assoc_len, GFP_KERNEL); | 519 | assoc = kmemdup(req->amp_assoc, assoc_len, GFP_KERNEL); |
520 | if (!assoc) { | 520 | if (!assoc) { |
521 | amp_ctrl_put(ctrl); | 521 | amp_ctrl_put(ctrl); |
522 | hci_dev_put(hdev); | ||
522 | return -ENOMEM; | 523 | return -ENOMEM; |
523 | } | 524 | } |
524 | 525 | ||