@@ -1844,7 +1844,7 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
struct bdaddr_list *b, *t;
u8 num_entries = 0;
bool pend_conn, pend_report;
- int err;
+ int err, ret;
/* Pause advertising if resolving list can be used as controllers are
* cannot accept resolving list modifications while advertising.
@@ -1930,6 +1930,8 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
err = -EINVAL;
done:
+ ret = err ? 0x00 : 0x01;
+
/* Enable address resolution when LL Privacy is enabled. */
err = hci_le_set_addr_resolution_enable_sync(hdev, 0x01);
if (err)
@@ -1940,7 +1942,7 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
hci_resume_advertising_sync(hdev);
/* Select filter policy to use accept list */
- return err ? 0x00 : 0x01;
+ return ret;
}
/* Returns true if an le connection is in the scanning state */