OP-TEE: optimize client application running process

Client applications are forbidden to run before supplicant
application is ready. Detection of supplicant application
status is added at the entry of open operation.

Change-Id: Ief4106bcd75251790b82d76e4d69092900af29e3
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
This commit is contained in:
Elon Zhang 2019-05-14 17:33:58 +08:00 committed by Tao Huang
parent 08e8e9538e
commit 78f9f87a9d

View File

@ -174,6 +174,12 @@ static int tee_supp_open(struct tee *tee)
__func__);
atomic_sub(1, &tee->rpc->used);
}
} else {
if (atomic_read(&tee->rpc->used) == 0) {
ret = -EPERM;
dev_err(tee->dev, "%s: ERROR Supplicant application NOT ready\n",
__func__);
}
}
return ret;