aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@nokia.com>2011-01-11 10:20:20 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:08 -0500
commit5a08eccedaa1e12b74cf3afea9e11a9aefc29f73 (patch)
tree9bc0f14ce8785a32cf1d4cf4ebf1c297312fada8 /net/bluetooth/hci_event.c
parent17fa4b9dff72fb3a1a68cc80caf98fc941d2b8b3 (diff)
Bluetooth: Do not use assignments in IF conditions
Fix checkpatch warnings concerning assignments in if conditions. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 617f58363dbc..cee46cbe7aeb 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -851,11 +851,14 @@ static void hci_cs_add_sco(struct hci_dev *hdev, __u8 status)
851 hci_dev_lock(hdev); 851 hci_dev_lock(hdev);
852 852
853 acl = hci_conn_hash_lookup_handle(hdev, handle); 853 acl = hci_conn_hash_lookup_handle(hdev, handle);
854 if (acl && (sco = acl->link)) { 854 if (acl) {
855 sco->state = BT_CLOSED; 855 sco = acl->link;
856 if (sco) {
857 sco->state = BT_CLOSED;
856 858
857 hci_proto_connect_cfm(sco, status); 859 hci_proto_connect_cfm(sco, status);
858 hci_conn_del(sco); 860 hci_conn_del(sco);
861 }
859 } 862 }
860 863
861 hci_dev_unlock(hdev); 864 hci_dev_unlock(hdev);
@@ -1037,11 +1040,14 @@ static void hci_cs_setup_sync_conn(struct hci_dev *hdev, __u8 status)
1037 hci_dev_lock(hdev); 1040 hci_dev_lock(hdev);
1038 1041
1039 acl = hci_conn_hash_lookup_handle(hdev, handle); 1042 acl = hci_conn_hash_lookup_handle(hdev, handle);
1040 if (acl && (sco = acl->link)) { 1043 if (acl) {
1041 sco->state = BT_CLOSED; 1044 sco = acl->link;
1045 if (sco) {
1046 sco->state = BT_CLOSED;
1042 1047
1043 hci_proto_connect_cfm(sco, status); 1048 hci_proto_connect_cfm(sco, status);
1044 hci_conn_del(sco); 1049 hci_conn_del(sco);
1050 }
1045 } 1051 }
1046 1052
1047 hci_dev_unlock(hdev); 1053 hci_dev_unlock(hdev);