[1/7] netpoll: Set npinfo to NULL even with ndo_netpoll_cleanup

Submitted by Herbert Xu on June 10, 2010, 12:42 p.m.


Message ID E1OMh56-0004N0-Oy@gondolin.me.apana.org.au
State Superseded
Delegated to: David Miller
Headers show

Commit Message

Herbert Xu June 10, 2010, 12:42 p.m.
netpoll: Set npinfo to NULL even with ndo_netpoll_cleanup

Sinec we have to null npinfo regardless of whether there is a
ndo_netpoll_cleanup, it makes sense to do this unconditionally
in netpoll_cleanup rather than having every driver do it by

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

 net/core/netpoll.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 94825b1..748c930 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -898,8 +898,7 @@  void netpoll_cleanup(struct netpoll *np)
 				ops = np->dev->netdev_ops;
 				if (ops->ndo_netpoll_cleanup)
-				else
-					np->dev->npinfo = NULL;
+				np->dev->npinfo = NULL;