diff options
author | Himanshu Jha <himanshujha199640@gmail.com> | 2017-08-26 23:15:30 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-09-22 11:43:25 +0200 |
commit | 18fddf5fd2111dd670156b3dfb2dfed16d7889b4 (patch) | |
tree | 25fdab180b94b4f0449cd353ff13ea48eda1c5c1 /drivers/crypto/inside-secure | |
parent | crypto: n2 - remove null check before kfree (diff) | |
download | linux-18fddf5fd2111dd670156b3dfb2dfed16d7889b4.tar.xz linux-18fddf5fd2111dd670156b3dfb2dfed16d7889b4.zip |
crypto: inside-secure - remove null check before kfree
Kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure')
-rw-r--r-- | drivers/crypto/inside-secure/safexcel_hash.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c index 3980f946874f..74feb6227101 100644 --- a/drivers/crypto/inside-secure/safexcel_hash.c +++ b/drivers/crypto/inside-secure/safexcel_hash.c @@ -308,10 +308,8 @@ unmap_cache: ctx->base.cache_sz = 0; } free_cache: - if (ctx->base.cache) { - kfree(ctx->base.cache); - ctx->base.cache = NULL; - } + kfree(ctx->base.cache); + ctx->base.cache = NULL; unlock: spin_unlock_bh(&priv->ring[ring].egress_lock); |