mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
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>
This commit is contained in:
parent
5609c185f2
commit
ebba380cc9
1 changed files with 3 additions and 4 deletions
|
@ -207,7 +207,7 @@ static int lowpan_device_event(struct notifier_block *unused,
|
||||||
struct net_device *wdev = netdev_notifier_info_to_dev(ptr);
|
struct net_device *wdev = netdev_notifier_info_to_dev(ptr);
|
||||||
|
|
||||||
if (wdev->type != ARPHRD_IEEE802154)
|
if (wdev->type != ARPHRD_IEEE802154)
|
||||||
goto out;
|
return NOTIFY_DONE;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case NETDEV_UNREGISTER:
|
case NETDEV_UNREGISTER:
|
||||||
|
@ -219,11 +219,10 @@ static int lowpan_device_event(struct notifier_block *unused,
|
||||||
lowpan_dellink(wdev->ieee802154_ptr->lowpan_dev, NULL);
|
lowpan_dellink(wdev->ieee802154_ptr->lowpan_dev, NULL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
return NOTIFY_OK;
|
||||||
return NOTIFY_DONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct notifier_block lowpan_dev_notifier = {
|
static struct notifier_block lowpan_dev_notifier = {
|
||||||
|
|
Loading…
Reference in a new issue