Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8279dd74 authored by Jesper Juhl's avatar Jesper Juhl Committed by David S. Miller
Browse files

[CRYPTO] Don't check for NULL before kfree()



Checking a pointer for NULL before calling kfree() on it is redundant.
This patch removes such checks from crypto/

Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4634484
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -336,6 +336,5 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm)

void crypto_exit_cipher_ops(struct crypto_tfm *tfm)
{
	if (tfm->crt_cipher.cit_iv)
	kfree(tfm->crt_cipher.cit_iv);
}
+1 −2
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ int crypto_alloc_hmac_block(struct crypto_tfm *tfm)

void crypto_free_hmac_block(struct crypto_tfm *tfm)
{
	if (tfm->crt_digest.dit_hmac_block)
	kfree(tfm->crt_digest.dit_hmac_block);
}