Skip to content
Commit c23ca66a authored by Lv Ruyi's avatar Lv Ruyi Committed by Jens Wiklander
Browse files

optee: fix kfree NULL pointer



This patch fixes the following Coccinelle error:
drivers/tee/optee/ffa_abi.c: 877: ERROR  optee is NULL but dereferenced.

If memory allocation fails, optee is null pointer. the code will goto err
and release optee.

Fixes: 4615e5a3 ("optee: add FF-A support")
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarLv Ruyi <lv.ruyi@zte.com.cn>
Reviewed-by: default avatarSumit Garg <sumit.garg@linaro.org>
[jw: removed the redundant braces]
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
parent fa55b7dc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment