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>
This commit is contained in:
Ville Tervo
2011-02-22 16:10:53 -03:00
committed by Gustavo F. Padovan
parent bdce7bafb7
commit 30e7627219
4 changed files with 14 additions and 12 deletions

View File

@@ -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;
}