In both conditions we do exacly the same thing, so merge them. Signed-off-by: Gustavo F. Padovan <padovan@xxxxxxxxxxxxxx> --- net/bluetooth/l2cap_core.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 3af8882..28d4cf7 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -905,13 +905,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) bh_lock_sock(sk); - if (conn->hcon->type == LE_LINK) { - __clear_chan_timer(chan); - l2cap_state_change(chan, BT_CONNECTED); - sk->sk_state_change(sk); - } - - if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { + if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED || + conn->hcon->type == LE_LINK) { __clear_chan_timer(chan); l2cap_state_change(chan, BT_CONNECTED); sk->sk_state_change(sk); -- 1.7.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html