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>
This commit is contained in:
parent
b8d3de85ac
commit
18fddf5fd2
@ -308,10 +308,8 @@ unmap_cache:
|
|||||||
ctx->base.cache_sz = 0;
|
ctx->base.cache_sz = 0;
|
||||||
}
|
}
|
||||||
free_cache:
|
free_cache:
|
||||||
if (ctx->base.cache) {
|
kfree(ctx->base.cache);
|
||||||
kfree(ctx->base.cache);
|
ctx->base.cache = NULL;
|
||||||
ctx->base.cache = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
spin_unlock_bh(&priv->ring[ring].egress_lock);
|
spin_unlock_bh(&priv->ring[ring].egress_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user