Skip to content

Commit

Permalink
netpoll: Set npinfo to NULL even with ndo_netpoll_cleanup
Browse files Browse the repository at this point in the history
Since 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
themselves.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 15, 2010
1 parent 1ab6c16 commit c04ec80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,7 @@ void netpoll_cleanup(struct netpoll *np)
ops = np->dev->netdev_ops;
if (ops->ndo_netpoll_cleanup)
ops->ndo_netpoll_cleanup(np->dev);
else
np->dev->npinfo = NULL;
np->dev->npinfo = NULL;
}
}

Expand Down

0 comments on commit c04ec80

Please sign in to comment.