]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tee: amdtee: remove redundant NULL check for pool
authorRijo Thomas <Rijo-john.Thomas@amd.com>
Thu, 9 Jan 2020 12:53:22 +0000 (18:23 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Jan 2020 07:18:14 +0000 (15:18 +0800)
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>
drivers/tee/amdtee/core.c

index 45402844b669003e2bd91657716cfda215fdad7c..be8937eb5d43fd05c2e82ab98e4eb73479b31432 100644 (file)
@@ -484,8 +484,7 @@ static int __init amdtee_driver_init(void)
        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);