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>
This commit is contained in:
committed by
John W. Linville
parent
1b0241656b
commit
023a04bebe
@ -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;
|
||||
|
Reference in New Issue
Block a user