Skip to content

Commit

Permalink
Bluetooth: Remove unnecessary use of hci_dev_list_lock
Browse files Browse the repository at this point in the history
The get_connections function has no need to use hci_dev_list_lock. The
code was there probably because of a copy-paste mistake.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Johan Hedberg authored and Gustavo F. Padovan committed Jun 8, 2011
1 parent 75fde9e commit 37e1c55
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,17 +1092,13 @@ static int get_connections(struct sock *sk, u16 index)

put_unaligned_le16(count, &rp->conn_count);

read_lock(&hci_dev_list_lock);

i = 0;
list_for_each(p, &hdev->conn_hash.list) {
struct hci_conn *c = list_entry(p, struct hci_conn, list);

bacpy(&rp->conn[i++], &c->dst);
}

read_unlock(&hci_dev_list_lock);

err = cmd_complete(sk, index, MGMT_OP_GET_CONNECTIONS, rp, rp_len);

unlock:
Expand Down

0 comments on commit 37e1c55

Please sign in to comment.