소스 검색

[DECNET]: 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 <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Adrian Bunk 19 년 전
부모
커밋
3400112794
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      net/decnet/dn_route.c

+ 1 - 2
net/decnet/dn_route.c

@@ -149,8 +149,7 @@ static inline void dnrt_free(struct dn_route *rt)
 
 
 static inline void dnrt_drop(struct dn_route *rt)
 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);
 	call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free);
 }
 }