summaryrefslogtreecommitdiffstats
path: root/kernel/net/bluetooth/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/net/bluetooth/smp.c')
-rw-r--r--kernel/net/bluetooth/smp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/net/bluetooth/smp.c b/kernel/net/bluetooth/smp.c
index 1ab3dc9c8..7b815bcc8 100644
--- a/kernel/net/bluetooth/smp.c
+++ b/kernel/net/bluetooth/smp.c
@@ -2295,6 +2295,10 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
return 1;
chan = conn->smp;
+ if (!chan) {
+ BT_ERR("SMP security requested but not available");
+ return 1;
+ }
if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED))
return 1;