summaryrefslogtreecommitdiff
path: root/net/ieee802154
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-05-22 10:53:06 +0300
committerDavid S. Miller <davem@davemloft.net>2014-05-22 15:54:45 -0400
commitb3f7a7b48f429e52f3d3dc36d253627c2a73803b (patch)
treeb2cc83f6888a57d259033290830eea1c740f9d56 /net/ieee802154
parentd22adbfb39d190adb43c954ed308f2865f5e481f (diff)
ieee802154: missing put_dev() on error
We should call put_dev() on the error path here. Fixes: 3e9c156e2c21 ('ieee802154: add netlink interfaces for llsec') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/nl-mac.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c
index 5617b4c6d6d5..a3281b8bfd5b 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)