]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Bluetooth: L2CAP: Fix a condition in l2cap_sock_recvmsg()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 12 Mar 2020 11:33:09 +0000 (14:33 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 12 Mar 2020 14:12:00 +0000 (15:12 +0100)
Smatch complains about the indenting:

    net/bluetooth/l2cap_sock.c:1027 l2cap_sock_recvmsg()
    warn: inconsistent indenting

It looks like this is supposed to be an "else if" condition.

Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_sock.c

index 0c636be3469ef8b4aae4e2844afb8a3b0be2f36c..40fb10b591bd3650e03653d92ec9d3f6db1ec02b 100644 (file)
@@ -1024,7 +1024,7 @@ static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg,
                        sk->sk_state = BT_CONNECTED;
                        pi->chan->state = BT_CONNECTED;
                        __l2cap_ecred_conn_rsp_defer(pi->chan);
-               } if (bdaddr_type_is_le(pi->chan->src_type)) {
+               } else if (bdaddr_type_is_le(pi->chan->src_type)) {
                        sk->sk_state = BT_CONNECTED;
                        pi->chan->state = BT_CONNECTED;
                        __l2cap_le_connect_rsp_defer(pi->chan);