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 at 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 <
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 at gmail.com>Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Yes this looks correct to me. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
From: Herbert Xu <herbert at 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 at gmail.com> > > Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> > > Yes this looks correct to me.Applied.