]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Bluetooth: Fix error return for l2cap_connect_rsp().
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Tue, 22 Jun 2010 16:56:26 +0000 (13:56 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jul 2010 17:39:10 +0000 (10:39 -0700)
Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c

index ac25952538fd87e5ac591801458902120113775f..58c81cbb4040ae5dadde424e2e1be60303595393 100644 (file)
@@ -2986,11 +2986,11 @@ static inline int l2cap_connect_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hd
        if (scid) {
                sk = l2cap_get_chan_by_scid(&conn->chan_list, scid);
                if (!sk)
-                       return 0;
+                       return -EFAULT;
        } else {
                sk = l2cap_get_chan_by_ident(&conn->chan_list, cmd->ident);
                if (!sk)
-                       return 0;
+                       return -EFAULT;
        }
 
        switch (result) {