aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tee/optee
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-11-22 10:20:50 +0800
committerJens Wiklander <jens.wiklander@linaro.org>2021-11-29 22:02:25 +0100
commitb98aee466d194788bd651cb375b0e0f7e0e69865 (patch)
treea5d59ae60e4b6e3fb168b9ac5e8c0ca982d9d4cd /drivers/tee/optee
parentoptee: add asynchronous notifications (diff)
downloadlinux-dev-b98aee466d194788bd651cb375b0e0f7e0e69865.tar.xz
linux-dev-b98aee466d194788bd651cb375b0e0f7e0e69865.zip
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/optee')
-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;
}