Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf7a6b2d authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211_hwsim: clean up netlink exit code



There's no need to print a message, and genl_unregister_family()
can't really fail so remove the error message there as well.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 28cb1749
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -2180,20 +2180,14 @@ static int hwsim_init_netlink(void)

static void hwsim_exit_netlink(void)
{
	int ret;

	/* userspace test API hasn't been adjusted for multi-channel */
	if (channels > 1)
		return;

	printk(KERN_INFO "mac80211_hwsim: closing netlink\n");
	/* unregister the notifier */
	netlink_unregister_notifier(&hwsim_netlink_notifier);
	/* unregister the family */
	ret = genl_unregister_family(&hwsim_genl_family);
	if (ret)
		printk(KERN_DEBUG "mac80211_hwsim: "
		       "unregister family %i\n", ret);
	genl_unregister_family(&hwsim_genl_family);
}

static const struct ieee80211_iface_limit hwsim_if_limits[] = {