diff options
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/nl-mac.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c index 5617b4c6d6d..a3281b8bfd5 100644 --- a/net/ieee802154/nl-mac.c +++ b/net/ieee802154/nl-mac.c @@ -832,8 +832,10 @@ int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info) return -ENODEV; ops = ieee802154_mlme_ops(dev); - if (!ops->llsec) - return -EOPNOTSUPP; + if (!ops->llsec) { + rc = -EOPNOTSUPP; + goto out_dev; + } msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!msg) |