From: Zhao, Gang Date: Mon, 21 Apr 2014 04:53:04 +0000 (+0800) Subject: cfg80211: change return value of notifier function X-Git-Tag: v3.16-rc1~27^2~279^2^2~12^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6784c7db8d43d29aab7f520b54f3aa0c5d51ecbc;p=thirdparty%2Fkernel%2Flinux.git cfg80211: change return value of notifier function 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 Signed-off-by: Johannes Berg --- diff --git a/net/wireless/core.c b/net/wireless/core.c index 5f33462e10ec8..b3ff3697239a4 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -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 = { diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 6550e20c8e494..fce423a4e96af 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -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 = {