mirror of https://github.com/thesofproject/sof.git
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:
parent
aff99b209f
commit
10251c5037
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue