From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] ieee802154: missing put_dev() on error
Date: Thu, 22 May 2014 10:53:06 +0300 [thread overview]
Message-ID: <20140522075306.GB4346@mwanda> (raw)
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>
---
Applies to -next
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c
index 5617b4c..a3281b8 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)
next reply other threads:[~2014-05-22 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 7:53 Dan Carpenter [this message]
2014-05-22 19:55 ` [patch] ieee802154: missing put_dev() on error David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140522075306.GB4346@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=davem@davemloft.net \
--cc=dbaryshkov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).