Bluetooth: Mesh: Fail init on model init error
Adds propagation of error returns from the model init callbacks in Access, and removing any other checks for successful init in the foundation models. Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit is contained in:
parent
2972cdc763
commit
a385873336
4 changed files with 32 additions and 55 deletions
|
@ -389,10 +389,6 @@ static int health_srv_init(struct bt_mesh_model *model)
|
|||
struct bt_mesh_health_srv *srv = model->user_data;
|
||||
|
||||
if (!srv) {
|
||||
if (!bt_mesh_model_in_primary(model)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
BT_ERR("No Health Server context provided");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue