host/mesh: Remove krp param check
param can never be NULL, so this check is redundant. Coverity complains
about this, as the param variable is accessed before the check, which
would be wrong if param could be NULL.
This is port of
@@ -134,8 +134,7 @@ static int krp_status(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- if (!bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_KRP_STATUS, ctx->addr,
- (void **)&param)) {
+ if (!bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_KRP_STATUS, ctx->addr, (void **)&param)) {
return -ENOENT;
}
@@ -147,11 +146,11 @@ static int krp_status(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
return -ENOENT;
}
- if (param && param->status) {
+ if (param->status) {
*param->status = status;
}
- if (param && param->phase) {
+ if (param->phase) {
*param->phase = phase;
}
