Skip to content

Commit

Permalink
ieee802154: missing put_dev() on error
Browse files Browse the repository at this point in the history
We should call put_dev() on the error path here.

Fixes: 3e9c156 ('ieee802154: add netlink interfaces for llsec')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed May 22, 2014
1 parent d22adbf commit b3f7a7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/ieee802154/nl-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b3f7a7b

Please sign in to comment.