diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-11-22 10:20:50 +0800 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2021-11-29 22:02:25 +0100 |
commit | b98aee466d194788bd651cb375b0e0f7e0e69865 (patch) | |
tree | a5d59ae60e4b6e3fb168b9ac5e8c0ca982d9d4cd /drivers/tee | |
parent | 6749e69c4dadd352bdfdb306513aa48cc15fbdd6 (diff) |
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.c | 4 |
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; } |