Message ID | 20190906122502.27236-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | [-next] crypto: essiv - Remove unnecessary NULL checks | expand |
diff --git a/crypto/essiv.c b/crypto/essiv.c index a8befc8..3d3f9d7 100644 --- a/crypto/essiv.c +++ b/crypto/essiv.c @@ -188,8 +188,7 @@ static void essiv_aead_done(struct crypto_async_request *areq, int err) struct aead_request *req = areq->data; struct essiv_aead_request_ctx *rctx = aead_request_ctx(req); - if (rctx->assoc) - kfree(rctx->assoc); + kfree(rctx->assoc); aead_request_complete(req, err); }
NULL check before kfree is not needed. Generated-by: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- crypto/essiv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)