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>
This commit is contained in:
Su Kang Yin 2015-08-07 16:54:10 +08:00 committed by Johannes Berg
parent b119ad6e72
commit 2459cd876e

View File

@ -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;