mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
netpoll: call dev_put() on error in netpoll_setup()
There is a dev_put(ndev) missing on an error path. This was
introduced in 0c1ad04aec
"netpoll: prevent netpoll setup on slave
devices".
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f1c089e319
commit
83fe32de63
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user