Skip to content

Commit

Permalink
mac80211_hwsim: clean up netlink exit code
Browse files Browse the repository at this point in the history
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: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jan 10, 2014
1 parent 28cb174 commit cf7a6b2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit cf7a6b2

Please sign in to comment.