diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-02-22 11:13:55 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-02-23 22:29:40 +0300 |
commit | ebba380cc94689e372387aa7f63c063a3663e846 (patch) | |
tree | cfc6184600c67aa8c3f7c673c02fad978a2521a3 /net/ieee802154 | |
parent | 5609c185f24dffca5f6a9c127106869da150be03 (diff) | |
download | linux-ebba380cc94689e372387aa7f63c063a3663e846.tar.xz |
ieee802154: 6lowpan: fix return of netdev notifier
This patch fixed the return value of netdev notifier. If the command is
a don't care a NOTIFY_DONE should be returned. If the command matched a
NOTIFY_OK should be returned.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <aar@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/6lowpan/core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c index 737c87a2a41e..0023c9048812 100644 --- a/net/ieee802154/6lowpan/core.c +++ b/net/ieee802154/6lowpan/core.c @@ -207,7 +207,7 @@ static int lowpan_device_event(struct notifier_block *unused, struct net_device *wdev = netdev_notifier_info_to_dev(ptr); if (wdev->type != ARPHRD_IEEE802154) - goto out; + return NOTIFY_DONE; switch (event) { case NETDEV_UNREGISTER: @@ -219,11 +219,10 @@ static int lowpan_device_event(struct notifier_block *unused, lowpan_dellink(wdev->ieee802154_ptr->lowpan_dev, NULL); break; default: - break; + return NOTIFY_DONE; } -out: - return NOTIFY_DONE; + return NOTIFY_OK; } static struct notifier_block lowpan_dev_notifier = { |