Commit 2459cd87 authored by Su Kang Yin's avatar Su Kang Yin Committed by Johannes Berg

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: default avatarSu Kang Yin <cantona@cantona.net>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b119ad6e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment