[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1432807250-223365-1-git-send-email-long.wanglong@huawei.com>
Date: Thu, 28 May 2015 10:00:50 +0000
From: Wang Long <long.wanglong@...wei.com>
To: <davem@...emloft.net>, <netdev@...r.kernel.org>
CC: <long.wanglong@...wei.com>, <linux-kernel@...r.kernel.org>,
<peifeiyue@...wei.com>, <wanglong@...qinren.net>
Subject: [PATCH] netevent: remove automatic variable in register_netevent_notifier()
Remove automatic variable 'err' in register_netevent_notifier() and
return the return value of atomic_notifier_chain_register() directly.
Signed-off-by: Wang Long <long.wanglong@...wei.com>
---
net/core/netevent.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/core/netevent.c b/net/core/netevent.c
index f17ccd2..8b3bc4f 100644
--- a/net/core/netevent.c
+++ b/net/core/netevent.c
@@ -31,10 +31,7 @@ static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain);
*/
int register_netevent_notifier(struct notifier_block *nb)
{
- int err;
-
- err = atomic_notifier_chain_register(&netevent_notif_chain, nb);
- return err;
+ return atomic_notifier_chain_register(&netevent_notif_chain, nb);
}
EXPORT_SYMBOL_GPL(register_netevent_notifier);
--
1.8.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists