mirror of
https://github.com/Evolution-X-Devices/kernel_google_b1c1
synced 2026-02-08 14:04:56 +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:
committed by
Johannes Berg
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user