From: Vinicius Costa Gomes Date: Sat, 18 Jun 2011 01:46:26 +0000 (-0300) Subject: Bluetooth: Fix crash when setting a LE socket to ready X-Git-Tag: 2.1b_release~2459 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97ed955d1719c63ea6d7aef81f974e10b1339937;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git Bluetooth: Fix crash when setting a LE socket to ready We should not try to do any other type of configuration for LE links when they become ready. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b026dcf..15397f2 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -919,11 +919,11 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) bh_lock_sock(sk); - if (conn->hcon->type == LE_LINK) + if (conn->hcon->type == LE_LINK) { if (smp_conn_security(conn, chan->sec_level)) l2cap_chan_ready(sk); - if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { + } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { __clear_chan_timer(chan); l2cap_state_change(chan, BT_CONNECTED); sk->sk_state_change(sk);