diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-07-06 13:51:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-06 13:51:00 -0700 |
commit | e1fe8b667a5c9657b1899837eb481e63264a8a37 (patch) | |
tree | b63d639f9020baf566aef6959404e6e7d6d50616 | |
parent | c7d7c4747c5d49b0208768dcb4f09eb0f3ef7960 (diff) | |
download | linux-crypto-e1fe8b667a5c9657b1899837eb481e63264a8a37.tar.gz linux-crypto-e1fe8b667a5c9657b1899837eb481e63264a8a37.zip |
[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 <juhl-lkml@dif.dk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | crypto/cipher.c | 3 | ||||
-rw-r--r-- | crypto/hmac.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c index f434ce7c..69264497 100644 --- 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 index 847df926..da0456b3 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c @@ -49,8 +49,7 @@ 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); + kfree(tfm->crt_digest.dit_hmac_block); } void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen) |