提交 83fe32de 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f1c089e3
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册