From patchwork Sun Jan 10 20:50:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 7997971 Return-Path: X-Original-To: patchwork-linux-wpan@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C760BEEE5 for ; Sun, 10 Jan 2016 20:50:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9D9820389 for ; Sun, 10 Jan 2016 20:50:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1C9120384 for ; Sun, 10 Jan 2016 20:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757402AbcAJUus (ORCPT ); Sun, 10 Jan 2016 15:50:48 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33929 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757359AbcAJUur (ORCPT ); Sun, 10 Jan 2016 15:50:47 -0500 Received: by mail-wm0-f66.google.com with SMTP id b14so23606300wmb.1; Sun, 10 Jan 2016 12:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wRNnrR0zhEqIHeiKfTINFHlakuk3mOF/Nv97VIub6/4=; b=sK9Lb3maioF1d30HewIzakddvJPFGLRAe3rmddIXw6UYhIhAn2xaBjltu0NZEitYzM ziHAEFKL21izXkSPoeq8ZBqNpHmqUSo4vVzA93ZenGfc+zYHnZykrM4jcdtW3CIIj4Em iztABy4e08SIYNZOFgZyXN+Q8arLv7sNL2+rEWaD4Vv/fq/TOBo4GMJ1Ug9yeMSFrYis P+flhQ3uV6M3HMTDYVkNBKzKJmS1zczz4TsYubzCjt0abUrjjnvbVCjBzdK+UaHgK036 AgXA8NwbyjbgGOjcGwEAEn0yg9IjnFBrmgRcYRA79VEH6HuDlFHCNQDkI8mhIkfz1LpN xgUw== X-Received: by 10.28.229.20 with SMTP id c20mr9310324wmh.79.1452459046066; Sun, 10 Jan 2016 12:50:46 -0800 (PST) Received: from omega.localdomain (p20030064A908BF32E2CB4EFFFE1BB546.dip0.t-ipconnect.de. [2003:64:a908:bf32:e2cb:4eff:fe1b:b546]) by smtp.gmail.com with ESMTPSA id d2sm116524078wjy.16.2016.01.10.12.50.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jan 2016 12:50:45 -0800 (PST) From: Alexander Aring To: linux-wpan@vger.kernel.org Cc: linux-bluetooth@vger.kernel.org, kernel@pengutronix.de, mcr@sandelman.ca, lukasz.duda@nordicsemi.no, Alexander Aring Subject: [PATCH bluetooth-next 2/2] ieee802154: 6lowpan: fix return of netdev notifier Date: Sun, 10 Jan 2016 21:50:25 +0100 Message-Id: <1452459025-13884-3-git-send-email-alex.aring@gmail.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1452459025-13884-1-git-send-email-alex.aring@gmail.com> References: <1452459025-13884-1-git-send-email-alex.aring@gmail.com> Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Alexander Aring Reviewed-by: Stefan Schmidt --- net/ieee802154/6lowpan/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 = {