--- zzzz-none-000/linux-2.6.39.4/net/ipv6/reassembly.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/net/ipv6/reassembly.c 2021-11-10 13:23:11.000000000 +0000 @@ -239,7 +239,7 @@ hash = inet6_hash_frag(id, src, dst, ip6_frags.rnd); q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash); - if (q == NULL) + if (!q) return NULL; return container_of(q, struct frag_queue, q); @@ -328,7 +328,7 @@ goto found; } prev = NULL; - for(next = fq->q.fragments; next != NULL; next = next->next) { + for (next = fq->q.fragments; next; next = next->next) { if (FRAG6_CB(next)->offset >= offset) break; /* bingo! */ prev = next; @@ -437,7 +437,7 @@ fq->q.fragments = head; } - WARN_ON(head == NULL); + WARN_ON(!head); WARN_ON(FRAG6_CB(head)->offset != 0); /* Unfragmented part is taken from the first segment. */ @@ -458,7 +458,8 @@ struct sk_buff *clone; int i, plen = 0; - if ((clone = alloc_skb(0, GFP_ATOMIC)) == NULL) + clone = alloc_skb(0, GFP_ATOMIC); + if (!clone) goto out_oom; clone->next = head->next; head->next = clone; @@ -565,7 +566,7 @@ ip6_evictor(net, ip6_dst_idev(skb_dst(skb))); fq = fq_find(net, fhdr->identification, &hdr->saddr, &hdr->daddr); - if (fq != NULL) { + if (fq) { int ret; spin_lock(&fq->q.lock); @@ -638,7 +639,7 @@ table = ip6_frags_ns_ctl_table; if (!net_eq(net, &init_net)) { table = kmemdup(table, sizeof(ip6_frags_ns_ctl_table), GFP_KERNEL); - if (table == NULL) + if (!table) goto err_alloc; table[0].data = &net->ipv6.frags.high_thresh; @@ -647,7 +648,7 @@ } hdr = register_net_sysctl_table(net, net_ipv6_ctl_path, table); - if (hdr == NULL) + if (!hdr) goto err_reg; net->ipv6.sysctl.frags_hdr = hdr; @@ -676,7 +677,7 @@ { ip6_ctl_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ip6_frags_ctl_table); - return ip6_ctl_header == NULL ? -ENOMEM : 0; + return !ip6_ctl_header ? -ENOMEM : 0; } static void ip6_frags_sysctl_unregister(void)