aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/amp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/amp.c')
-rw-r--r--net/bluetooth/amp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/amp.c b/net/bluetooth/amp.c
index 5dab2d1c7c82..b6e1c3ac74f1 100644
--- a/net/bluetooth/amp.c
+++ b/net/bluetooth/amp.c
@@ -184,6 +184,10 @@ int phylink_gen_key(struct hci_conn *conn, u8 *data, u8 *len, u8 *type)
184 *len = HCI_AMP_LINK_KEY_SIZE; 184 *len = HCI_AMP_LINK_KEY_SIZE;
185 185
186 key = hci_find_link_key(hdev, &conn->dst); 186 key = hci_find_link_key(hdev, &conn->dst);
187 if (!key) {
188 BT_DBG("No Link key for conn %p dst %pMR", conn, &conn->dst);
189 return -EACCES;
190 }
187 191
188 /* BR/EDR Link Key concatenated together with itself */ 192 /* BR/EDR Link Key concatenated together with itself */
189 memcpy(&keybuf[0], key->val, HCI_LINK_KEY_SIZE); 193 memcpy(&keybuf[0], key->val, HCI_LINK_KEY_SIZE);