diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-31 16:39:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-31 16:39:04 -0400 |
commit | 7b6249bba940f57c20cdde793b306ca3831778c7 (patch) | |
tree | 24caf2ec9ea6fca08fe225228614807d0919b4b2 /net/mac80211/aes_gcm.c | |
parent | fbcb21705930f2930f506149d0b8d36dfbe45107 (diff) | |
parent | 2c44be81f0fc147eed9dc63e2601318b2c007aeb (diff) | |
download | talos-obmc-linux-7b6249bba940f57c20cdde793b306ca3831778c7.tar.gz talos-obmc-linux-7b6249bba940f57c20cdde793b306ca3831778c7.zip |
Merge tag 'mac80211-next-for-davem-2015-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:
====================
Lots of updates for net-next; along with the usual flurry
of small fixes, cleanups and internal features we have:
* VHT support for TDLS and IBSS (conditional on drivers though)
* first TX performance improvements (the biggest will come later)
* many suspend/resume (race) fixes
* name_assign_type support from Tom Gundersen
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/aes_gcm.c')
-rw-r--r-- | net/mac80211/aes_gcm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/mac80211/aes_gcm.c b/net/mac80211/aes_gcm.c index c2bf6698d738..fd278bbe1b0d 100644 --- a/net/mac80211/aes_gcm.c +++ b/net/mac80211/aes_gcm.c @@ -80,11 +80,15 @@ struct crypto_aead *ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], return tfm; err = crypto_aead_setkey(tfm, key, key_len); - if (!err) - err = crypto_aead_setauthsize(tfm, IEEE80211_GCMP_MIC_LEN); - if (!err) - return tfm; + if (err) + goto free_aead; + err = crypto_aead_setauthsize(tfm, IEEE80211_GCMP_MIC_LEN); + if (err) + goto free_aead; + + return tfm; +free_aead: crypto_free_aead(tfm); return ERR_PTR(err); } |