From: Gustavo F. Padovan <padovan@profusion.mobi>
Date: Fri, 17 Jun 2011 15:58:41 +0000 (-0300)
Subject: Bluetooth: hci_conn_auto_accept() doesn't need locking
X-Git-Tag: firefly_0821_release~3680^2~3834^2~44^2~71^2~32
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b9cc553f12d14b692d0fcb607d28db783da68139;p=firefly-linux-kernel-4.4.55.git

Bluetooth: hci_conn_auto_accept() doesn't need locking

It doesn't really touch any sensitive information about hdev. So no need
to lock here.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
---

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 7d88a6142092..e6d8a220b5d9 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -362,12 +362,8 @@ static void hci_conn_auto_accept(unsigned long arg)
 	struct hci_conn *conn = (void *) arg;
 	struct hci_dev *hdev = conn->hdev;
 
-	hci_dev_lock(hdev);
-
 	hci_send_cmd(hdev, HCI_OP_USER_CONFIRM_REPLY, sizeof(conn->dst),
 								&conn->dst);
-
-	hci_dev_unlock(hdev);
 }
 
 struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)