audio-hal: Fix kw issue

Fix kw issue, goto exit to unlock the thread lock.

Change-Id: I94c65ee97f145b3d57aa8137eeb4daf63411a6c5
This commit is contained in:
ftong 2023-11-27 14:39:19 +08:00
parent 29d7a42b51
commit e8a09a9b87
1 changed files with 4 additions and 2 deletions

View File

@ -902,7 +902,8 @@ int effect_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize,
}
if (pCmdData == NULL || cmdSize != 2 * sizeof(uint32_t) ||
replySize == NULL || *replySize < 2*sizeof(int32_t)) {
return -EINVAL;
status = -EINVAL;
goto exit;
}
memcpy(pReplyData, pCmdData, sizeof(int32_t)*2);
} break;
@ -946,7 +947,8 @@ int effect_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize,
cmdSize, pCmdData, *replySize, pReplyData);
if (cmdSize != sizeof(uint32_t) || pCmdData == NULL
|| pReplyData == NULL || *replySize != sizeof(int)) {
return -EINVAL;
status = -EINVAL;
goto exit;
}
uint32_t value = *(uint32_t *)pCmdData;
if (context->ops.set_hw_acc_mode)