aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/sco.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-11-01 15:08:50 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2010-11-22 15:23:18 -0500
commitc89ad7372232b69fd37edf90d6f5d2a8d6381214 (patch)
treefa62412e8663f2e1e7288d649f3d96d84c4d68bb /net/bluetooth/sco.c
parent7379efeacb707f49729080791a7a562d8996aec4 (diff)
Bluetooth: Fix not returning proper error in SCO
Return 0 in that situation could lead to errors in the caller. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r--net/bluetooth/sco.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index d0927d1fdada..66b9e5c0523a 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -882,7 +882,7 @@ static int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
882 int lm = 0; 882 int lm = 0;
883 883
884 if (type != SCO_LINK && type != ESCO_LINK) 884 if (type != SCO_LINK && type != ESCO_LINK)
885 return 0; 885 return -EINVAL;
886 886
887 BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr)); 887 BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));
888 888
@@ -908,7 +908,7 @@ static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
908 BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); 908 BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status);
909 909
910 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) 910 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
911 return 0; 911 return -EINVAL;
912 912
913 if (!status) { 913 if (!status) {
914 struct sco_conn *conn; 914 struct sco_conn *conn;
@@ -927,7 +927,7 @@ static int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
927 BT_DBG("hcon %p reason %d", hcon, reason); 927 BT_DBG("hcon %p reason %d", hcon, reason);
928 928
929 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) 929 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
930 return 0; 930 return -EINVAL;
931 931
932 sco_conn_del(hcon, bt_err(reason)); 932 sco_conn_del(hcon, bt_err(reason));
933 933