tree d824994f48492dc3910ec3bf82d147cd8f796f20
parent b4634484815e1879512a23e4f59eef648135c30a
author Jesper Juhl <[EMAIL PROTECTED]> Thu, 07 Jul 2005 03:51:00 -0700
committer David S. Miller <[EMAIL PROTECTED]> Thu, 07 Jul 2005 03:51:00 -0700
[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: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
crypto/cipher.c | 3 +--
crypto/hmac.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/crypto/cipher.c b/crypto/cipher.c
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -336,6 +336,5 @@ out:
void crypto_exit_cipher_ops(struct crypto_tfm *tfm)
{
- if (tfm->crt_cipher.cit_iv)
- kfree(tfm->crt_cipher.cit_iv);
+ kfree(tfm->crt_cipher.cit_iv);
}
diff --git a/crypto/hmac.c b/crypto/hmac.c
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -49,8 +49,7 @@ int crypto_alloc_hmac_block(struct crypt
void crypto_free_hmac_block(struct crypto_tfm *tfm)
{
- if (tfm->crt_digest.dit_hmac_block)
- kfree(tfm->crt_digest.dit_hmac_block);
+ kfree(tfm->crt_digest.dit_hmac_block);
}
void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen)
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html