diff options
author | Su Kang Yin <cantona@cantona.net> | 2015-08-07 16:54:10 +0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-08-14 17:49:52 +0200 |
commit | 2459cd876e2828dc63c19ea5dadf8a94a8f11244 (patch) | |
tree | daf6b1b29a06a2ee41fdc2817bfd031051e239d0 /drivers/net/wireless/mac80211_hwsim.c | |
parent | b119ad6e726cc805f739f8f6843b9de4df1f895e (diff) | |
download | linux-stable-2459cd876e2828dc63c19ea5dadf8a94a8f11244.tar.gz linux-stable-2459cd876e2828dc63c19ea5dadf8a94a8f11244.tar.bz2 linux-stable-2459cd876e2828dc63c19ea5dadf8a94a8f11244.zip |
mac80211_hwsim: unregister genetlink family properly
During hwsim_init_netlink(), we should call genl_unregister_family()
if failed on netlink_register_notifier() since the genetlink is
already registered.
Signed-off-by: Su Kang Yin <cantona@cantona.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 08022ded6307..dbb46ece6f52 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -3121,8 +3121,10 @@ static int hwsim_init_netlink(void) goto failure; rc = netlink_register_notifier(&hwsim_netlink_notifier); - if (rc) + if (rc) { + genl_unregister_family(&hwsim_genl_family); goto failure; + } return 0; |