From: Alexander Aring Date: Mon, 22 Feb 2016 08:13:55 +0000 (+0100) Subject: ieee802154: 6lowpan: fix return of netdev notifier X-Git-Tag: v4.14-rc1~3609^2~138^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebba380cc94689e372387aa7f63c063a3663e846;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c index 737c87a..0023c90 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 = {