summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-06-12 03:55:22 +0200
committerDavid S. Miller <davem@davemloft.net>2011-06-12 03:55:22 +0200
commit83fe32de63e60af34fa8dae83716cb13b8677abd (patch)
treee4f7526b481ac06bdb7fb6712d30a84ac64aa7ab /net
parentnet: ep93xx_eth: fix DMA API violations (diff)
downloadlinux-83fe32de63e60af34fa8dae83716cb13b8677abd.tar.xz
linux-83fe32de63e60af34fa8dae83716cb13b8677abd.zip
netpoll: call dev_put() on error in netpoll_setup()
There is a dev_put(ndev) missing on an error path. This was introduced in 0c1ad04aecb "netpoll: prevent netpoll setup on slave devices". Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/netpoll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 42ea4b0e59f1..18d9cbda3a39 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -795,7 +795,8 @@ int netpoll_setup(struct netpoll *np)
if (ndev->master) {
printk(KERN_ERR "%s: %s is a slave device, aborting.\n",
np->name, np->dev_name);
- return -EBUSY;
+ err = -EBUSY;
+ goto put;
}
if (!netif_running(ndev)) {