Bluetooth: Remove unneeded code

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:27 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=847012c5e04544aef485dfec29c1c07dc90615a4
Commit:     847012c5e04544aef485dfec29c1c07dc90615a4
Parent:     b9b343d25484bbceaee454ab422daafb1c5eda96
Author:     Andre Guedes <andre.guedes at openbossa.org>
AuthorDate: Fri Jul 27 15:10:12 2012 -0300
Committer:  Gustavo Padovan <gustavo.padovan at collabora.co.uk>
CommitDate: Mon Aug 6 15:05:51 2012 -0300

    Bluetooth: Remove unneeded code
    
    This patch removes some unneeded code from hci_cs_le_create_conn.
    
    If the hci_conn is not found, it means this LE connection attempt
    was triggered by a thrid-party tool (e.g. hcitool). We should not
    create this new hci_conn in LE Create Connection command status
    event since it is already properly handled in LE Connection
    Complete event.
    
    Signed-off-by: Andre Guedes <andre.guedes at openbossa.org>
    Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
---
 net/bluetooth/hci_event.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 8b13ccc..27064be 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1638,16 +1638,6 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status)
 			hci_proto_connect_cfm(conn, status);
 			hci_conn_del(conn);
 		}
-	} else {
-		if (!conn) {
-			conn = hci_conn_add(hdev, LE_LINK, &cp->peer_addr);
-			if (conn) {
-				conn->dst_type = cp->peer_addr_type;
-				conn->out = true;
-			} else {
-				BT_ERR("No memory for new connection");
-			}
-		}
 	}
 
 	hci_dev_unlock(hdev);



More information about the linux-mtd-cvs mailing list