Skip to content

Commit 399e0aa

Browse files
Dan Carpenterklassert
authored andcommitted
xfrm: Remove unnecessary NULL check in xfrm_lookup_with_ifid()
This NULL check is unnecessary and can be removed. It confuses Smatch static analysis tool because it makes Smatch think that xfrm_lookup_with_ifid() can return a mix of NULL pointers and errors so it creates a lot of false positives. Remove it. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent 2e460ee commit 399e0aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/xfrm/xfrm_policy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,7 @@ struct dst_entry *xfrm_lookup_with_ifid(struct net *net,
32943294

32953295
ok:
32963296
xfrm_pols_put(pols, drop_pols);
3297-
if (dst && dst->xfrm &&
3297+
if (dst->xfrm &&
32983298
(dst->xfrm->props.mode == XFRM_MODE_TUNNEL ||
32993299
dst->xfrm->props.mode == XFRM_MODE_IPTFS))
33003300
dst->flags |= DST_XFRM_TUNNEL;

0 commit comments

Comments
 (0)