diff options
author | Jesper Juhl <jj@chaosbits.net> | 2010-11-04 21:59:56 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 18:26:11 (GMT) |
commit | ffa56e540c3949c4560dcce45eca247819e183c1 (patch) | |
tree | 014fb3286ef0e879c6b78196ded7c87baccde252 /net/mac80211/aes_ccm.c | |
parent | 723fc7af5300dba9eac40cb23dbefa67589e5181 (diff) | |
download | linux-fsl-qoriq-ffa56e540c3949c4560dcce45eca247819e183c1.tar.xz |
mac80211: Remove redundant checks for NULL before calls to crypto_free_cipher()
crypto_free_cipher() is a wrapper around crypto_free_tfm() which is a
wrapper around crypto_destroy_tfm() and the latter can handle being passed
a NULL pointer, so checking for NULL in the
ieee80211_aes_key_free()/ieee80211_aes_cmac_key_free() wrappers around
crypto_free_cipher() is pointless and just increase object code size
needlesly and makes us execute extra test/branch instructions that we
don't need.
Btw; don't we have to many wrappers around wrappers ad nauseam here?
Anyway, this patch removes the redundant conditionals.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/aes_ccm.c')
-rw-r--r-- | net/mac80211/aes_ccm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/aes_ccm.c b/net/mac80211/aes_ccm.c index d2b03e0..4bd6ef0 100644 --- a/net/mac80211/aes_ccm.c +++ b/net/mac80211/aes_ccm.c @@ -147,6 +147,5 @@ struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[]) void ieee80211_aes_key_free(struct crypto_cipher *tfm) { - if (tfm) - crypto_free_cipher(tfm); + crypto_free_cipher(tfm); } |