From: Dan Carpenter Date: Fri, 2 Oct 2015 07:47:29 +0000 (+0300) Subject: nl802154: Missing return in nl802154_add_llsec_key() X-Git-Tag: firefly_0821_release~176^2~818^2~173^2~26 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa6555622cdf443f0b001352fdc3afb6e7bce20d;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Alexander Aring Signed-off-by: Marcel Holtmann --- 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;