OSDN Git Service

netfilter: nf_conntrack: checking for IS_ERR() instead of NULL
[uclinux-h8/linux.git] / net / bluetooth / smp.c
index 3d0f7d2..ad82324 100644 (file)
@@ -2312,6 +2312,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;