mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 02:21:47 +00:00
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;
|
||||
|
||||
rc = netlink_register_notifier(&hwsim_netlink_notifier);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
genl_unregister_family(&hwsim_genl_family);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user