Skip to content

Commit 6784c7d

Browse files
zhao-gangjmberg-intel
authored andcommitted
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 <gamerh2o@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent f26cbf4 commit 6784c7d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎net/wireless/core.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,11 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
10021002
if (rfkill_blocked(rdev->rfkill))
10031003
return notifier_from_errno(-ERFKILL);
10041004
break;
1005+
default:
1006+
return NOTIFY_DONE;
10051007
}
10061008

1007-
return NOTIFY_DONE;
1009+
return NOTIFY_OK;
10081010
}
10091011

10101012
static struct notifier_block cfg80211_netdev_notifier = {

‎net/wireless/nl80211.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11672,7 +11672,7 @@ static int nl80211_netlink_notify(struct notifier_block * nb,
1167211672

1167311673
rcu_read_unlock();
1167411674

11675-
return NOTIFY_DONE;
11675+
return NOTIFY_OK;
1167611676
}
1167711677

1167811678
static struct notifier_block nl80211_netlink_notifier = {

0 commit comments

Comments
 (0)