Skip to content

Commit

Permalink
sdfw_services: Allow rpc_init to fail in ssf_client init
Browse files Browse the repository at this point in the history
Allow nrf_rpc_init to fail duing the ssf_client initialization.
This call will try to initialize all transports, since we initialize
ssf_client early during the boot some other IPC transports might
fail to initialize. This is not an issue since it the other transports
can get initialized later in the boot process.

The change here checks that only the relevant transport has been
initialized.

Signed-off-by: Georgios Vasilakis <[email protected]>
  • Loading branch information
Vge0rge committed Nov 21, 2024
1 parent dded07f commit 1f263f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions subsys/sdfw_services/transport/nrf_rpc/ssf_client_nrf_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,19 @@ static void err_handler(const struct nrf_rpc_err_report *report)

int ssf_client_transport_init(ssf_client_transport_notif_handler handler)
{
int err;

if (handler == NULL) {
return -SSF_EINVAL;
}
notif_handler = handler;

transport_initialized = false;

err = nrf_rpc_init(err_handler);
if (err != 0) {
/* We ignore the nrf_rpc_init on purpose here, the nrf_rpc_init
* will try to initialize all the transports/groups, but we only
* want to check that the ssf_group is initialized.
*/
nrf_rpc_init(err_handler);
if (!NRF_RPC_GROUP_STATUS(ssf_group)) {
return -SSF_EINVAL;
}

Expand Down

0 comments on commit 1f263f2

Please sign in to comment.