|
@@ -4187,14 +4187,14 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|
|
else
|
|
|
addr_type = BDADDR_LE_RANDOM;
|
|
|
|
|
|
- /* Drop the connection if he device is blocked */
|
|
|
- if (hci_bdaddr_list_lookup(&hdev->blacklist, &conn->dst, addr_type)) {
|
|
|
- hci_conn_drop(conn);
|
|
|
+ if (ev->status) {
|
|
|
+ hci_le_conn_failed(conn, ev->status);
|
|
|
goto unlock;
|
|
|
}
|
|
|
|
|
|
- if (ev->status) {
|
|
|
- hci_le_conn_failed(conn, ev->status);
|
|
|
+ /* Drop the connection if the device is blocked */
|
|
|
+ if (hci_bdaddr_list_lookup(&hdev->blacklist, &conn->dst, addr_type)) {
|
|
|
+ hci_conn_drop(conn);
|
|
|
goto unlock;
|
|
|
}
|
|
|
|