diff options
Diffstat (limited to 'net/mac80211/wep.c')
-rw-r--r-- | net/mac80211/wep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 6d133b6efce5..9ebc8d8a1f5b 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c | |||
@@ -32,13 +32,16 @@ int ieee80211_wep_init(struct ieee80211_local *local) | |||
32 | 32 | ||
33 | local->wep_tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, | 33 | local->wep_tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, |
34 | CRYPTO_ALG_ASYNC); | 34 | CRYPTO_ALG_ASYNC); |
35 | if (IS_ERR(local->wep_tx_tfm)) | 35 | if (IS_ERR(local->wep_tx_tfm)) { |
36 | local->wep_rx_tfm = ERR_PTR(-EINVAL); | ||
36 | return PTR_ERR(local->wep_tx_tfm); | 37 | return PTR_ERR(local->wep_tx_tfm); |
38 | } | ||
37 | 39 | ||
38 | local->wep_rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, | 40 | local->wep_rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, |
39 | CRYPTO_ALG_ASYNC); | 41 | CRYPTO_ALG_ASYNC); |
40 | if (IS_ERR(local->wep_rx_tfm)) { | 42 | if (IS_ERR(local->wep_rx_tfm)) { |
41 | crypto_free_blkcipher(local->wep_tx_tfm); | 43 | crypto_free_blkcipher(local->wep_tx_tfm); |
44 | local->wep_tx_tfm = ERR_PTR(-EINVAL); | ||
42 | return PTR_ERR(local->wep_rx_tfm); | 45 | return PTR_ERR(local->wep_rx_tfm); |
43 | } | 46 | } |
44 | 47 | ||