PD#TV-5392
Problem:
when playing netflix movies, press power button, TV can not
power down and console hang.
Solution:
1. check supplicant status before send message
Test: manual - mm
Verify:
TXLX + Android P
Change-Id: Ia4829ba22de97ee06273632f7b824ddfa5909ee4
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
{
struct optee *optee = tee_get_drvdata(ctx->teedev);
struct optee_supp *supp = &optee->supp;
- struct optee_supp_req *req = kzalloc(sizeof(*req), GFP_KERNEL);
+ struct optee_supp_req *req = NULL;
bool interruptable;
u32 ret;
+ if (!supp->ctx)
+ return TEEC_ERROR_COMMUNICATION;
+
+ req = kzalloc(sizeof(*req), GFP_KERNEL);
if (!req)
return TEEC_ERROR_OUT_OF_MEMORY;