summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-08-19 19:03:29 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-08-19 19:17:41 +0200
commitc4cb901ac667f81786b402ca7d69a9063e770b3a (patch)
tree19284e5c3d84114c412f810cec3c1d6b6ca50b6e /net
parentmac802154: fixed potential skb leak with mac802154_parse_frame_start (diff)
downloadlinux-c4cb901ac667f81786b402ca7d69a9063e770b3a.tar.xz
linux-c4cb901ac667f81786b402ca7d69a9063e770b3a.zip
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 <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/6lowpan_rtnl.c2
1 files changed, 1 insertions, 1 deletions
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;