net/decnet/dn_route.c: fix inconsequent NULL checking
Subsystems (2)
PATCH 1/1 net/decnet/dn_route.c: fix inconsequent NULL checking
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 <[email protected]>
net/decnet/dn_route.c renamed from net/decnet/dn_route.c.old +1 -2
@@ -149,8 +149,7 @@ static inline void dnrt_free(struct dn_rstatic 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); }
Quoted 5 lines · Adrian Bunk
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,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtFrom: Adrian Bunk <[email protected]>
Date: Sat, 11 Mar 2006 00:02:33 +0100
Quoted 7 lines
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 <[email protected]>
Applied, thanks Adrian.