mac80211: fix initialisation error path
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>
This commit is contained in:
parent
f0b9205cfb
commit
3eadf5f4f6
|
@ -1344,17 +1344,17 @@ static int __init ieee80211_init(void)
|
||||||
|
|
||||||
ret = rc80211_simple_init();
|
ret = rc80211_simple_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto out;
|
||||||
|
|
||||||
ret = rc80211_pid_init();
|
ret = rc80211_pid_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail_simple;
|
goto out_cleanup_simple;
|
||||||
|
|
||||||
ret = ieee80211_wme_register();
|
ret = ieee80211_wme_register();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_DEBUG "ieee80211_init: failed to "
|
printk(KERN_DEBUG "ieee80211_init: failed to "
|
||||||
"initialize WME (err=%d)\n", ret);
|
"initialize WME (err=%d)\n", ret);
|
||||||
goto fail_pid;
|
goto out_cleanup_pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
ieee80211_debugfs_netdev_init();
|
ieee80211_debugfs_netdev_init();
|
||||||
|
@ -1362,11 +1362,11 @@ static int __init ieee80211_init(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail_pid:
|
out_cleanup_pid:
|
||||||
rc80211_simple_exit();
|
|
||||||
fail_simple:
|
|
||||||
rc80211_pid_exit();
|
rc80211_pid_exit();
|
||||||
fail:
|
out_cleanup_simple:
|
||||||
|
rc80211_simple_exit();
|
||||||
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue