summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-11-01 19:08:50 +0000
committerGustavo F. Padovan <padovan@profusion.mobi>2010-11-22 18:23:18 -0200
commitc89ad7372232b69fd37edf90d6f5d2a8d6381214 (patch)
treefa62412e8663f2e1e7288d649f3d96d84c4d68bb
parent7379efeacb707f49729080791a7a562d8996aec4 (diff)
downloadblackbird-op-linux-c89ad7372232b69fd37edf90d6f5d2a8d6381214.tar.gz
blackbird-op-linux-c89ad7372232b69fd37edf90d6f5d2a8d6381214.zip
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>
-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)
int lm = 0;
if (type != SCO_LINK && type != ESCO_LINK)
- return 0;
+ return -EINVAL;
BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));
@@ -908,7 +908,7 @@ static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status);
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
- return 0;
+ return -EINVAL;
if (!status) {
struct sco_conn *conn;
@@ -927,7 +927,7 @@ static int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
BT_DBG("hcon %p reason %d", hcon, reason);
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
- return 0;
+ return -EINVAL;
sco_conn_del(hcon, bt_err(reason));
OpenPOWER on IntegriCloud