diff options
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 2f5ae53057c7..fa48c0b3d93c 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -670,11 +670,11 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
670 | goto encrypt; | 670 | goto encrypt; |
671 | 671 | ||
672 | auth: | 672 | auth: |
673 | if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) | 673 | if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) |
674 | return 0; | 674 | return 0; |
675 | 675 | ||
676 | hci_conn_auth(conn, sec_level, auth_type); | 676 | if (!hci_conn_auth(conn, sec_level, auth_type)) |
677 | return 0; | 677 | return 0; |
678 | 678 | ||
679 | encrypt: | 679 | encrypt: |
680 | if (conn->link_mode & HCI_LM_ENCRYPT) | 680 | if (conn->link_mode & HCI_LM_ENCRYPT) |