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:
Trond Einar Snekvik 2020-05-15 15:06:35 +02:00 committed by Carles Cufí
commit a385873336
4 changed files with 32 additions and 55 deletions

View file

@ -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;
}