Describe the bug
Multiple locations in cadence.c e.g. in cadence_codec_init() mix together error codes from different incompatible sets:
|
static int cadence_codec_init(struct processing_module *mod) |
Expected behavior
Functions should return consistent error codes.
Impact
Error detection and interpretation becomes unreliable.
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology).
Screenshots or console output
int cadence_codec_init(struct comp_dev *dev)
{
int ret;
...
cd = codec_allocate_memory(dev, sizeof(struct cadence_codec_data), 0);
if (!cd) {
comp_err(dev, "cadence_codec_init(): failed to allocate memory for cadence codec data");
return -ENOMEM;
}
...
/* Obtain codec name */
API_CALL(cd, XA_API_CMD_GET_LIB_ID_STRINGS,
XA_CMD_TYPE_LIB_NAME, cd->name, ret);
if (ret != LIB_NO_ERROR) {
comp_err(dev, "cadence_codec_init() error %x: failed to get lib name",
ret);
codec_free_memory(dev, cd);
goto out;
}
...
out:
return ret;
}
Describe the bug
Multiple locations in cadence.c e.g. in
cadence_codec_init()mix together error codes from different incompatible sets:sof/src/audio/codec_adapter/codec/cadence.c
Line 97 in 7b5aa72
Expected behavior
Functions should return consistent error codes.
Impact
Error detection and interpretation becomes unreliable.
Environment
Screenshots or console output