From: Johan Hedberg Date: Mon, 29 Apr 2013 16:35:40 +0000 (+0300) Subject: Bluetooth: Fix duplicate call to l2cap_chan_ready() X-Git-Tag: next-20130607~63^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=561d14ae0dbd534577c3bc5801d8a2bd423014be;p=karo-tx-linux.git Bluetooth: Fix duplicate call to l2cap_chan_ready() In l2cap_le_conn_ready() after doing l2cap_chann_add() the LE channel is part of the list which is subsequently iterated in l2cap_conn_ready() in this loop each channel will get l2cap_chan_ready() called which would result in trying to set the channel two times into BT_CONNECTED state. Instead it makes sense to just add the channel but not call chan_ready in l2cap_le_conn_ready, which is what this patch does. Signed-off-by: Johan Hedberg Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 936ce23c3a20..e88cbc53ace4 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1371,8 +1371,6 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) l2cap_chan_add(conn, chan); - l2cap_chan_ready(chan); - clean: release_sock(parent); }