summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorVille Tervo <ville.tervo@nokia.com>2011-02-22 16:10:53 -0300
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-27 17:11:29 -0300
commit30e7627219f985cd17a1ac24e0163ebcfb1277bf (patch)
treef4c6688dff4b74d42327ca43b4660b9848c40b01 /net/bluetooth/hci_conn.c
parentbdce7bafb786701004b2055e15d6ff4b3be678f3 (diff)
downloadlinux-30e7627219f985cd17a1ac24e0163ebcfb1277bf.tar.gz
linux-30e7627219f985cd17a1ac24e0163ebcfb1277bf.tar.bz2
linux-30e7627219f985cd17a1ac24e0163ebcfb1277bf.zip
Bluetooth: Use ERR_PTR as return error from hci_connect
Use ERR_PTR mechanism to return error from hci_connect. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 4504cb6af6ae..7a6f56b2f49d 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -431,10 +431,10 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
if (type == LE_LINK) {
le = hci_conn_hash_lookup_ba(hdev, LE_LINK, dst);
if (le)
- return NULL;
+ return ERR_PTR(-EBUSY);
le = hci_conn_add(hdev, LE_LINK, dst);
if (!le)
- return NULL;
+ return ERR_PTR(-ENOMEM);
if (le->state == BT_OPEN)
hci_le_connect(le);