Przeglądaj źródła

Bluetooth: Fix error return for l2cap_connect_rsp().

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>
João Paulo Rechi Vita 15 lat temu
rodzic
commit
57d3b22bf5
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      net/bluetooth/l2cap.c

+ 2 - 2
net/bluetooth/l2cap.c

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