scm_qcpe: validate hab_recv() return value for retry
habmm_socket_recv() can return -EINTR which indicate that the operation must be restarted. Change-Id: I0860a9593303c7bf1fea5e0349595c4b2fb085eb Signed-off-by: Youssef Youssef <yyoussef@codeaurora.org>
This commit is contained in:
parent
9e66b661ec
commit
010a0cd6a6
1 changed files with 6 additions and 2 deletions
|
@ -473,11 +473,15 @@ static int scm_call_qcpe(u32 fn_id, struct scm_desc *desc)
|
|||
goto err_ret;
|
||||
}
|
||||
|
||||
size_bytes = sizeof(smc_params);
|
||||
|
||||
memset(&smc_params, 0x0, sizeof(smc_params));
|
||||
|
||||
do {
|
||||
size_bytes = sizeof(smc_params);
|
||||
ret = habmm_socket_recv(handle, &smc_params, &size_bytes, 0,
|
||||
HABMM_SOCKET_RECV_FLAGS_UNINTERRUPTIBLE);
|
||||
} while (-EINTR == ret);
|
||||
|
||||
if (ret) {
|
||||
pr_err("habmm_socket_recv failed, ret= 0x%x\n", ret);
|
||||
goto err_ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue