Bluetooth: Remove unnecessary 'err' variable from bt_connect_le()
Instead of caring about stop_scanning() failure it's better to have bt_connect_le() do "best effort" and simply try to continue in this case. Change-Id: I14896a4dfbe0bfd2564a190080743f0c9b05d174 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
7d8e97c9a1
commit
47cb69458a
@ -1536,7 +1536,6 @@ int bt_hci_le_conn_update(uint16_t handle, uint16_t min, uint16_t max,
|
||||
struct bt_conn *bt_connect_le(const bt_addr_le_t *peer)
|
||||
{
|
||||
struct bt_conn *conn;
|
||||
int err = 0;
|
||||
|
||||
conn = bt_conn_lookup_addr_le(peer);
|
||||
if (conn) {
|
||||
@ -1560,12 +1559,10 @@ struct bt_conn *bt_connect_le(const bt_addr_le_t *peer)
|
||||
|
||||
/* Restart scanning if duplicate filtering feature is used */
|
||||
if (dev.scan_enable && dev.scan_filter) {
|
||||
err = bt_hci_stop_scanning();
|
||||
bt_hci_stop_scanning();
|
||||
}
|
||||
|
||||
if (!err) {
|
||||
trigger_scan();
|
||||
}
|
||||
trigger_scan();
|
||||
|
||||
return conn;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user