6lowpan: iphc: remove check on null
authorAlexander Aring <alex.aring@gmail.com>
Tue, 29 Jul 2014 21:47:03 +0000 (23:47 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2014 17:28:39 +0000 (19:28 +0200)
This memory is placed on stack and can't be null so remove the check on
null.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/6lowpan/iphc.c

index d4fc2dd8ad75f3d15450231c9c807d0a1cfc3882..de78deb499594750c2cfe13c36c14b65709b21ce 100644 (file)
@@ -268,9 +268,6 @@ uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
        bool fail;
        u8 tmp = 0, val = 0;
 
-       if (!uh)
-               goto err;
-
        fail = lowpan_fetch_skb(skb, &tmp, sizeof(tmp));
 
        if ((tmp & LOWPAN_NHC_UDP_MASK) == LOWPAN_NHC_UDP_ID) {