* [2.6 patch] net/decnet/dn_route.c: fix inconsequent NULL checking
@ 2006-03-10 23:02 Adrian Bunk
2006-03-11 2:51 ` Herbert Xu
2006-03-15 1:06 ` David S. Miller
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2006-03-10 23:02 UTC (permalink / raw)
To: patrick; +Cc: linux-decnet-user, netdev, linux-kernel
The Coverity checker noted this inconsequent NULL checking in
dnrt_drop().
Since all callers ensure that NULL isn't passed, we can simply remove
the check.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.16-rc5-mm3-full/net/decnet/dn_route.c.old 2006-03-10 23:34:57.000000000 +0100
+++ linux-2.6.16-rc5-mm3-full/net/decnet/dn_route.c 2006-03-10 23:35:08.000000000 +0100
@@ -149,8 +149,7 @@ static inline void dnrt_free(struct dn_r
static inline void dnrt_drop(struct dn_route *rt)
{
- if (rt)
- dst_release(&rt->u.dst);
+ dst_release(&rt->u.dst);
call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/decnet/dn_route.c: fix inconsequent NULL checking
2006-03-10 23:02 [2.6 patch] net/decnet/dn_route.c: fix inconsequent NULL checking Adrian Bunk
@ 2006-03-11 2:51 ` Herbert Xu
2006-03-15 1:06 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2006-03-11 2:51 UTC (permalink / raw)
To: Adrian Bunk; +Cc: patrick, linux-decnet-user, netdev, linux-kernel
Adrian Bunk <bunk@stusta.de> wrote:
> The Coverity checker noted this inconsequent NULL checking in
> dnrt_drop().
>
> Since all callers ensure that NULL isn't passed, we can simply remove
> the check.
Ack.
In fact it's pointless even if the caller didn't check as dst_release
checks it anyway.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/decnet/dn_route.c: fix inconsequent NULL checking
2006-03-10 23:02 [2.6 patch] net/decnet/dn_route.c: fix inconsequent NULL checking Adrian Bunk
2006-03-11 2:51 ` Herbert Xu
@ 2006-03-15 1:06 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2006-03-15 1:06 UTC (permalink / raw)
To: bunk; +Cc: patrick, linux-decnet-user, netdev, linux-kernel
From: Adrian Bunk <bunk@stusta.de>
Date: Sat, 11 Mar 2006 00:02:33 +0100
> The Coverity checker noted this inconsequent NULL checking in
> dnrt_drop().
>
> Since all callers ensure that NULL isn't passed, we can simply remove
> the check.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Applied, thanks Adrian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-15 1:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-10 23:02 [2.6 patch] net/decnet/dn_route.c: fix inconsequent NULL checking Adrian Bunk
2006-03-11 2:51 ` Herbert Xu
2006-03-15 1:06 ` David S. 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).