From 023a04bebe7030c1e6d5347bd3f27a3e49a1f222 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Mon, 14 Jul 2008 12:52:08 -0700 Subject: 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 Signed-off-by: John W. Linville --- net/mac80211/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/mac80211/main.c') diff --git a/net/mac80211/main.c b/net/mac80211/main.c index f1a83d450ea0..b5830f7055cf 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1731,8 +1731,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) result = ieee80211_wep_init(local); if (result < 0) { - printk(KERN_DEBUG "%s: Failed to initialize wep\n", - wiphy_name(local->hw.wiphy)); + printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n", + wiphy_name(local->hw.wiphy), result); goto fail_wep; } -- cgit v1.2.3