Skip to content

Commit

Permalink
ieee802154: 6lowpan: fix return of netdev notifier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Feb 23, 2016
1 parent 5609c18 commit ebba380
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/ieee802154/6lowpan/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 = {
Expand Down

0 comments on commit ebba380

Please sign in to comment.