comp: return warning instead of error in comp_get_model()

In comp_get_model() function we should return warning in
case not allocated model->data.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
Bartosz Kokoszko 2020-06-19 09:58:40 +02:00 committed by Liam Girdwood
parent 6a23e48e15
commit 998f0a422d
1 changed files with 3 additions and 2 deletions

View File

@ -471,8 +471,9 @@ int comp_get_model(struct comp_dev *dev, struct comp_model_data *model,
model->data_pos += bs;
} else {
comp_err(dev, "comp_get_model(): !model->data");
ret = -EINVAL;
comp_warn(dev, "comp_get_model(): model->data not allocated yet.");
cdata->data->abi = SOF_ABI_VERSION;
cdata->data->size = 0;
}
return ret;