--- zzzz-none-000/linux-2.6.39.4/net/ipv6/icmp.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/net/ipv6/icmp.c 2021-11-10 13:23:11.000000000 +0000 @@ -147,7 +147,7 @@ tp = skb_header_pointer(skb, ptr+offsetof(struct icmp6hdr, icmp6_type), sizeof(_type), &_type); - if (tp == NULL || + if (!tp || !(*tp & ICMPV6_INFOMSG_MASK)) return 1; } @@ -212,7 +212,7 @@ offset += skb_network_offset(skb); op = skb_header_pointer(skb, offset, sizeof(_optval), &_optval); - if (op == NULL) + if (!op) return 1; return (*op & 0xC0) == 0x80; } @@ -223,7 +223,8 @@ struct icmp6hdr *icmp6h; int err = 0; - if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) + skb = skb_peek(&sk->sk_write_queue); + if (!skb) goto out; icmp6h = icmp6_hdr(skb); @@ -453,7 +454,7 @@ security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); sk = icmpv6_xmit_lock(net); - if (sk == NULL) + if (!sk) return; np = inet6_sk(sk); @@ -548,7 +549,7 @@ security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); sk = icmpv6_xmit_lock(net); - if (sk == NULL) + if (!sk) return; np = inet6_sk(sk); @@ -812,7 +813,7 @@ net->ipv6.icmp_sk = kzalloc(nr_cpu_ids * sizeof(struct sock *), GFP_KERNEL); - if (net->ipv6.icmp_sk == NULL) + if (!net->ipv6.icmp_sk) return -ENOMEM; for_each_possible_cpu(i) {