Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3f7a7b4 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

ieee802154: missing put_dev() on error



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

Fixes: 3e9c156e ('ieee802154: add netlink interfaces for llsec')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d22adbfb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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)