From: Alexander Aring Date: Tue, 19 Aug 2014 17:03:29 +0000 (+0200) Subject: ieee802154: 6lowpan_rtnl: fix correct errno value X-Git-Tag: v3.17-rc5~41^2~32^2~7^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c4cb901ac667f81786b402ca7d69a9063e770b3a;p=karo-tx-linux.git ieee802154: 6lowpan_rtnl: fix correct errno value This patch correct the return value of lowpan_alloc_frag if an error occur. Errno numbers should always be negative. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index 016b77ee88f0..71fa7d42966c 100644 --- a/net/ieee802154/6lowpan_rtnl.c +++ b/net/ieee802154/6lowpan_rtnl.c @@ -246,7 +246,7 @@ lowpan_alloc_frag(struct sk_buff *skb, int size, return ERR_PTR(-rc); } } else { - frag = ERR_PTR(ENOMEM); + frag = ERR_PTR(-ENOMEM); } return frag;