* [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
* Re: [patch] bridge: cleanup: remove unneed check
[not found] ` <20100306122031.GA15864@gondor.apana.org.au>
@ 2010-03-07 23:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-07 23:27 UTC (permalink / raw)
To: herbert; +Cc: error27, shemminger, bridge, netdev, kernel-janitors
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 6 Mar 2010 20:20:32 +0800
> On Sat, Mar 06, 2010 at 02:14:09PM +0300, Dan Carpenter wrote:
>> 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>
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> Yes this looks correct to me.
Applied.
^ permalink raw reply [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).