summaryrefslogtreecommitdiff
path: root/drivers/tee
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-11-22 05:20:50 +0300
committerJens Wiklander <jens.wiklander@linaro.org>2021-11-30 00:02:25 +0300
commitb98aee466d194788bd651cb375b0e0f7e0e69865 (patch)
treea5d59ae60e4b6e3fb168b9ac5e8c0ca982d9d4cd /drivers/tee
parent6749e69c4dadd352bdfdb306513aa48cc15fbdd6 (diff)
downloadlinux-b98aee466d194788bd651cb375b0e0f7e0e69865.tar.xz
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: 6749e69c4dad ("optee: add asynchronous notifications") Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/optee/smc_abi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index 92759d70bfce..d7c8235c1c42 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -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;
}