summaryrefslogtreecommitdiff
path: root/net/bluetooth/mgmt.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/mgmt.c
parentbdce7bafb786701004b2055e15d6ff4b3be678f3 (diff)
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/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 16c7a4d0432c..46c3edc72cd1 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1171,8 +1171,8 @@ static int pair_device(struct sock *sk, u16 index, unsigned char *data, u16 len)
}
conn = hci_connect(hdev, ACL_LINK, &cp->bdaddr, sec_level, auth_type);
- if (!conn) {
- err = -ENOMEM;
+ if (IS_ERR(conn)) {
+ err = PTR_ERR(conn);
goto unlock;
}