ieee802154: 6lowpan: fix error frag handling
authorAlexander Aring <alex.aring@gmail.com>
Mon, 10 Aug 2015 19:15:59 +0000 (21:15 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 10 Aug 2015 18:43:07 +0000 (20:43 +0200)
This patch fixes the error handling for lowpan_xmit_fragment by replace
"-PTR_ERR" to "PTR_ERR". PTR_ERR returns already a negative errno code.

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

index 1bf4a304b5c4e3505fed3b952716c7bc7a2d9a0e..f6263fc1234056e89cd2c06046699c4fa1d75b39 100644 (file)
@@ -112,7 +112,7 @@ lowpan_xmit_fragment(struct sk_buff *skb, const struct ieee802154_hdr *wpan_hdr,
 
        frag = lowpan_alloc_frag(skb, frag_hdrlen + len, wpan_hdr);
        if (IS_ERR(frag))
-               return -PTR_ERR(frag);
+               return PTR_ERR(frag);
 
        memcpy(skb_put(frag, frag_hdrlen), frag_hdr, frag_hdrlen);
        memcpy(skb_put(frag, len), skb_network_header(skb) + offset, len);