data-blob: fix a NULL dereference

If the main context variable is NULL, it cannot be used to print an
error message. Since this actually should never happen, use an
assertion similar to other similar cases in the file.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2022-12-20 08:06:51 +01:00 committed by Kai Vehmanen
parent aff99b209f
commit 10251c5037
1 changed files with 1 additions and 5 deletions

View File

@ -281,11 +281,7 @@ int ipc4_comp_data_blob_set(struct comp_data_blob_handler *blob_handler,
int ret;
int valid_data_size;
if (!blob_handler) {
comp_err(blob_handler->dev,
"ipc4_comp_data_blob_set(): blob_handler is NULL!");
return -EINVAL;
}
assert(blob_handler);
comp_dbg(blob_handler->dev,
"ipc4_comp_data_blob_set(): data_offset = %d",