diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/netpoll.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index c3c7b27..fc75c9e 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -1284,15 +1284,14 @@ EXPORT_SYMBOL_GPL(__netpoll_free_async); void netpoll_cleanup(struct netpoll *np) { - if (!np->dev) - return; - rtnl_lock(); + if (!np->dev) + goto out; __netpoll_cleanup(np); - rtnl_unlock(); - dev_put(np->dev); np->dev = NULL; +out: + rtnl_unlock(); } EXPORT_SYMBOL(netpoll_cleanup); |