Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle.
To: "David S. Miller" <[email protected]> To: David Ahern <[email protected]> To: Eric Dumazet <[email protected]> To: Jakub Kicinski <[email protected]> To: Paolo Abeni <[email protected]> To: Simon Horman <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Philipp Hahn <[email protected]> --- net/ipv6/ila/ila_xlat.c | 2 +- net/ipv6/ndisc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c index 8991805fc3d60cfd2499146e522da142f33ddc50..c5e3954488ab7a1b1c07aff86385f5000945f1e4 100644 --- a/net/ipv6/ila/ila_xlat.c +++ b/net/ipv6/ila/ila_xlat.c @@ -545,7 +545,7 @@ int ila_xlat_nl_dump(struct sk_buff *skb, struct netlink_callback *cb) /* Get first entry */ ila = rhashtable_walk_peek(rhiter); - if (ila && !IS_ERR(ila) && skip) { + if (!IS_ERR_OR_NULL(ila) && skip) { /* Skip over visited entries */ while (ila && skip) { diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index f6a5d8c73af9721741c11b543e5abeecdbf2079f..ab340f2489c0c7555f48c1f3f5215cb1d0b5b341 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1083,7 +1083,7 @@ static enum skb_drop_reason ndisc_recv_na(struct sk_buff *skb) } } - if (neigh && !IS_ERR(neigh)) { + if (!IS_ERR_OR_NULL(neigh)) { u8 old_flags = neigh->flags; struct net *net = dev_net(dev); -- 2.43.0
