mirror of https://gitee.com/openkylin/linux.git
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:
parent
b119ad6e72
commit
2459cd876e
|
@ -3121,8 +3121,10 @@ static int hwsim_init_netlink(void)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
rc = netlink_register_notifier(&hwsim_netlink_notifier);
|
rc = netlink_register_notifier(&hwsim_netlink_notifier);
|
||||||
if (rc)
|
if (rc) {
|
||||||
|
genl_unregister_family(&hwsim_genl_family);
|
||||||
goto failure;
|
goto failure;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue