[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101207110138.GM10623@bicker>
Date: Tue, 7 Dec 2010 14:01:38 +0300
From: Dan Carpenter <error27@...il.com>
To: netdev@...r.kernel.org
Cc: Phil Blundell <philb@....org>,
Eric Dumazet <eric.dumazet@...il.com>,
"David S. Miller" <davem@...emloft.net>,
kernel-janitors@...r.kernel.org
Subject: [patch] econet: unlock on -EPERM path
We need to do a mutex_unlock() and a put_dev() before returning.
Signed-off-by: Dan Carpenter <error27@...il.com>
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 13992e1..f180371 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -661,8 +661,10 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
err = 0;
switch (cmd) {
case SIOCSIFADDR:
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) {
+ err = -EPERM;
+ break;
+ }
edev = dev->ec_ptr;
if (edev == NULL) {
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists