Commit 83fe32de authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

netpoll: call dev_put() on error in netpoll_setup()

There is a dev_put(ndev) missing on an error path.  This was
introduced in 0c1ad04a "netpoll: prevent netpoll setup on slave
devices".
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f1c089e3
...@@ -795,7 +795,8 @@ int netpoll_setup(struct netpoll *np) ...@@ -795,7 +795,8 @@ int netpoll_setup(struct netpoll *np)
if (ndev->master) { if (ndev->master) {
printk(KERN_ERR "%s: %s is a slave device, aborting.\n", printk(KERN_ERR "%s: %s is a slave device, aborting.\n",
np->name, np->dev_name); np->name, np->dev_name);
return -EBUSY; err = -EBUSY;
goto put;
} }
if (!netif_running(ndev)) { if (!netif_running(ndev)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment