Skip to content

Commit

Permalink
cfg80211: change return value of notifier function
Browse files Browse the repository at this point in the history
Return NOTIFY_DONE if we don't care this time's notification, return
NOTIFY_OK if we successfully handled this time's notification. That's
the formal way to do it.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Zhao, Gang authored and Johannes Berg committed Apr 25, 2014
1 parent f26cbf4 commit 6784c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,9 +1002,11 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
if (rfkill_blocked(rdev->rfkill))
return notifier_from_errno(-ERFKILL);
break;
default:
return NOTIFY_DONE;
}

return NOTIFY_DONE;
return NOTIFY_OK;
}

static struct notifier_block cfg80211_netdev_notifier = {
Expand Down
2 changes: 1 addition & 1 deletion net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -11672,7 +11672,7 @@ static int nl80211_netlink_notify(struct notifier_block * nb,

rcu_read_unlock();

return NOTIFY_DONE;
return NOTIFY_OK;
}

static struct notifier_block nl80211_netlink_notifier = {
Expand Down

0 comments on commit 6784c7d

Please sign in to comment.