diff options
author | Ville Tervo <ville.tervo@nokia.com> | 2011-02-22 14:10:53 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-27 15:11:29 -0500 |
commit | 30e7627219f985cd17a1ac24e0163ebcfb1277bf (patch) | |
tree | f4c6688dff4b74d42327ca43b4660b9848c40b01 /net/bluetooth/mgmt.c | |
parent | bdce7bafb786701004b2055e15d6ff4b3be678f3 (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.c | 4 |
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) | |||
1171 | } | 1171 | } |
1172 | 1172 | ||
1173 | conn = hci_connect(hdev, ACL_LINK, &cp->bdaddr, sec_level, auth_type); | 1173 | conn = hci_connect(hdev, ACL_LINK, &cp->bdaddr, sec_level, auth_type); |
1174 | if (!conn) { | 1174 | if (IS_ERR(conn)) { |
1175 | err = -ENOMEM; | 1175 | err = PTR_ERR(conn); |
1176 | goto unlock; | 1176 | goto unlock; |
1177 | } | 1177 | } |
1178 | 1178 | ||