cfg80211: change return value of notifier function
authorZhao, Gang <gamerh2o@gmail.com>
Mon, 21 Apr 2014 04:53:04 +0000 (12:53 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 25 Apr 2014 15:33:44 +0000 (17:33 +0200)
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>
net/wireless/core.c
net/wireless/nl80211.c

index 5f33462e10ec84a3986c41caef17a723e0ce0978..b3ff3697239a47b02d4008911c4c12bf7651b769 100644 (file)
@@ -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 = {
index 6550e20c8e494fc011e5a95de4f3fc98463081b4..fce423a4e96afcb0f9645575071c3407afeeb096 100644 (file)
@@ -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 = {