summaryrefslogtreecommitdiffstats
path: root/net/mac80211/wep.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-14 12:52:08 -0700
committerJohn W. Linville <linville@tuxdriver.com>2008-07-29 16:55:07 -0400
commit023a04bebe7030c1e6d5347bd3f27a3e49a1f222 (patch)
tree75309969e9c1749e20f26dd6b86d9d5fcd24e31a /net/mac80211/wep.c
parent1b0241656b658522a15e7aad570cb8ea6b255a2a (diff)
downloadlinux-023a04bebe7030c1e6d5347bd3f27a3e49a1f222.tar.gz
linux-023a04bebe7030c1e6d5347bd3f27a3e49a1f222.tar.bz2
linux-023a04bebe7030c1e6d5347bd3f27a3e49a1f222.zip
mac80211: return correct error return from ieee80211_wep_init
Return the proper error code rather than a hard-coded ENOMEM from ieee80211_wep_init. Also, print the error code on failure. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wep.c')
-rw-r--r--net/mac80211/wep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index 872d2fcd1a5b..5c2bf0a3d4db 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -31,13 +31,13 @@ int ieee80211_wep_init(struct ieee80211_local *local)
local->wep_tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0,
CRYPTO_ALG_ASYNC);
if (IS_ERR(local->wep_tx_tfm))
- return -ENOMEM;
+ return PTR_ERR(local->wep_tx_tfm);
local->wep_rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0,
CRYPTO_ALG_ASYNC);
if (IS_ERR(local->wep_rx_tfm)) {
crypto_free_blkcipher(local->wep_tx_tfm);
- return -ENOMEM;
+ return PTR_ERR(local->wep_rx_tfm);
}
return 0;