optee: Fix NULL but dereferenced coccicheck error

Eliminate the following coccicheck warning:
./drivers/tee/optee/smc_abi.c:1508:12-15: ERROR: optee is NULL but
dereferenced.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 6749e69c4d ("optee: add asynchronous notifications")
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
This commit is contained in:
Yang Li 2021-11-22 10:20:50 +08:00 committed by Jens Wiklander
parent 6749e69c4d
commit b98aee466d
1 changed files with 2 additions and 2 deletions

View File

@ -1505,8 +1505,8 @@ err_free_optee:
kfree(optee);
err_free_pool:
tee_shm_pool_free(pool);
if (optee->smc.memremaped_shm)
memunmap(optee->smc.memremaped_shm);
if (memremaped_shm)
memunmap(memremaped_shm);
return rc;
}