Skip to content

Commit

Permalink
mac80211: fix initialisation error path
Browse files Browse the repository at this point in the history
The error handling in ieee80211_init() is broken when any of
the built-in rate control algorithms fail to initialise, fix
it and rename the error labels.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 1, 2008
1 parent f0b9205 commit 3eadf5f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions net/mac80211/ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,29 +1344,29 @@ static int __init ieee80211_init(void)

ret = rc80211_simple_init();
if (ret)
goto fail;
goto out;

ret = rc80211_pid_init();
if (ret)
goto fail_simple;
goto out_cleanup_simple;

ret = ieee80211_wme_register();
if (ret) {
printk(KERN_DEBUG "ieee80211_init: failed to "
"initialize WME (err=%d)\n", ret);
goto fail_pid;
goto out_cleanup_pid;
}

ieee80211_debugfs_netdev_init();
ieee80211_regdomain_init();

return 0;

fail_pid:
rc80211_simple_exit();
fail_simple:
out_cleanup_pid:
rc80211_pid_exit();
fail:
out_cleanup_simple:
rc80211_simple_exit();
out:
return ret;
}

Expand Down

0 comments on commit 3eadf5f

Please sign in to comment.