From: Gustavo F. Padovan Date: Tue, 5 Apr 2011 18:24:40 +0000 (-0300) Subject: Bluetooth: Fix wrong comparison in listen() X-Git-Tag: v3.0-rc1~377^2~256^2^2~38^2~9 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=cd69a03af1106c486033df600c7945957ea5abeb;p=~shefty%2Frdma-dev.git Bluetooth: Fix wrong comparison in listen() We should check for the pi->scid there. Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index b2bfa1e0d74..473e5973d8f 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -269,7 +269,7 @@ static int l2cap_sock_listen(struct socket *sock, int backlog) goto done; } - if (!l2cap_pi(sk)->psm && !l2cap_pi(sk)->dcid) { + if (!l2cap_pi(sk)->psm && !l2cap_pi(sk)->scid) { bdaddr_t *src = &bt_sk(sk)->src; u16 psm;