Commit 18fddf5f authored by Himanshu Jha's avatar Himanshu Jha Committed by Herbert Xu

crypto: inside-secure - remove null check before kfree

Kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b8d3de85
......@@ -308,10 +308,8 @@ static int safexcel_ahash_send(struct crypto_async_request *async, int ring,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment