nimble/host: Fix error return in `ble_store_util_bonded_peers`
When `max_peer`(input parameter) is less than stored bonds,
`ble_store_util_bonded_peers` returns `BLE_HS_ENOMEM` status code
unnecessarily. It results in non deletion of oldest bond when
`ble_gap_unpair_oldest_peer` is called.
@@ -91,9 +91,6 @@ ble_store_util_bonded_peers(ble_addr_t *out_peer_id_addrs, int *out_num_peers,
if (rc != 0) {
return rc;
}
- if (set.status != 0) {
- return set.status;
- }
*out_num_peers = set.num_peers;
return 0;
