From: Jiri Pirko <jpirko@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, ebiederm@xmission.com
Subject: [PATCH net-next-2.6] pppoe: remove unnecessary checks in pppoe_flush_dev
Date: Tue, 4 May 2010 17:02:57 +0200 [thread overview]
Message-ID: <20100504150256.GD2845@psychotron.lab.eng.brq.redhat.com> (raw)
pernet memory is guaranteed to exist when notifiers are called.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index c059c8d..99f031a 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -290,12 +290,6 @@ static void pppoe_flush_dev(struct net_device *dev)
struct pppoe_net *pn;
int i;
- BUG_ON(dev == NULL);
-
- pn = pppoe_pernet(dev_net(dev));
- if (!pn) /* already freed */
- return;
-
write_lock_bh(&pn->hash_lock);
for (i = 0; i < PPPOE_HASH_SIZE; i++) {
struct pppox_sock *po = pn->hash_table[i];
next reply other threads:[~2010-05-04 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 15:02 Jiri Pirko [this message]
2010-05-05 7:56 ` [PATCH net-next-2.6] pppoe: remove unnecessary checks in pppoe_flush_dev David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100504150256.GD2845@psychotron.lab.eng.brq.redhat.com \
--to=jpirko@redhat.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).