From: Rijo Thomas Date: Thu, 9 Jan 2020 12:53:22 +0000 (+0530) Subject: tee: amdtee: remove redundant NULL check for pool X-Git-Tag: v5.6-rc1~152^2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=279c075dc1d25f888f1a7423ecd1fdcdc54eba6a;p=thirdparty%2Flinux.git 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 Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu --- diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c index 45402844b6690..be8937eb5d43f 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);