summaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-02 10:47:29 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-10-02 23:34:37 +0200
commitaa6555622cdf443f0b001352fdc3afb6e7bce20d (patch)
treea6d47a68f7ae87ff8c31efe1dc95ea3120b627ea /net/ieee802154
parent5f509239eccc9d118d3474a22e78b3da1ceefe02 (diff)
downloadtalos-obmc-linux-aa6555622cdf443f0b001352fdc3afb6e7bce20d.tar.gz
talos-obmc-linux-aa6555622cdf443f0b001352fdc3afb6e7bce20d.zip
nl802154: Missing return in nl802154_add_llsec_key()
There was a missing return here so it meant that often ieee802154_llsec_parse_key_id() was not called. Fixes: a26c5fd7622d ('nl802154: add support for security layer') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/nl802154.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 1e9e86508441..16ef0d9f566e 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1534,6 +1534,7 @@ static int nl802154_add_llsec_key(struct sk_buff *skb, struct genl_info *info)
if (!attrs[NL802154_KEY_ATTR_USAGE_FRAMES] ||
!attrs[NL802154_KEY_ATTR_BYTES])
+ return -EINVAL;
if (ieee802154_llsec_parse_key_id(attrs[NL802154_KEY_ATTR_ID], &id) < 0)
return -ENOBUFS;
OpenPOWER on IntegriCloud