ieee802154: missing put_dev() on error

We should call put_dev() on the error path here.

Fixes: 3e9c156e2c ('ieee802154: add netlink interfaces for llsec')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2014-05-22 10:53:06 +03:00 committed by David S. Miller
parent d22adbfb39
commit b3f7a7b48f

View file

@ -832,8 +832,10 @@ int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info)
return -ENODEV; return -ENODEV;
ops = ieee802154_mlme_ops(dev); ops = ieee802154_mlme_ops(dev);
if (!ops->llsec) if (!ops->llsec) {
return -EOPNOTSUPP; rc = -EOPNOTSUPP;
goto out_dev;
}
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!msg) if (!msg)