summaryrefslogtreecommitdiffstats
path: root/drivers/tee
diff options
context:
space:
mode:
authorRijo Thomas <Rijo-john.Thomas@amd.com>2020-01-09 18:23:22 +0530
committerHerbert Xu <herbert@gondor.apana.org.au>2020-01-16 15:18:14 +0800
commit279c075dc1d25f888f1a7423ecd1fdcdc54eba6a (patch)
tree5398aa3e8352432c85c00bf31556ff759eba4b85 /drivers/tee
parentf9568eae924717c37f8f1a42a22eaa1754a96053 (diff)
downloadlinux-279c075dc1d25f888f1a7423ecd1fdcdc54eba6a.tar.bz2
tee: amdtee: remove redundant NULL check for pool
Remove NULL check for pool variable, since in the current code path it is guaranteed to be non-NULL. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/amdtee/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
index 45402844b669..be8937eb5d43 100644
--- a/drivers/tee/amdtee/core.c
+++ b/drivers/tee/amdtee/core.c
@@ -484,8 +484,7 @@ err_device_unregister:
tee_device_unregister(amdtee->teedev);
err_free_pool:
- if (pool)
- tee_shm_pool_free(pool);
+ tee_shm_pool_free(pool);
err_kfree_amdtee:
kfree(amdtee);