From: Dan Carpenter Date: Sun, 12 Jun 2011 01:55:22 +0000 (-0700) Subject: netpoll: call dev_put() on error in netpoll_setup() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=83fe32de63e60af34fa8dae83716cb13b8677abd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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)) {