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:

committed by
Gustavo F. Padovan

parent
bdce7bafb7
commit
30e7627219
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user