netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] bridge: cleanup: remove unneed check
@ 2010-03-06 11:14 Dan Carpenter
       [not found] ` <20100306122031.GA15864@gondor.apana.org.au>
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-03-06 11:14 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev, kernel-janitors, bridge, David S. Miller

We dereference "port" on the lines immediately before and immediately 
after the test so port should hopefully never be null here.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 2559fb5..8b25887 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -627,8 +627,8 @@ static void br_multicast_port_query_expired(unsigned long data)
 	struct net_bridge *br = port->br;
 
 	spin_lock(&br->multicast_lock);
-	if (port && (port->state == BR_STATE_DISABLED ||
-		     port->state == BR_STATE_BLOCKING))
+	if (port->state == BR_STATE_DISABLED ||
+	    port->state == BR_STATE_BLOCKING)
 		goto out;
 
 	if (port->multicast_startup_queries_sent <

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-07 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-06 11:14 [patch] bridge: cleanup: remove unneed check Dan Carpenter
     [not found] ` <20100306122031.GA15864@gondor.apana.org.au>
2010-03-07 23:27   ` David Miller

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).