diff options
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index b5873bdff61..64f51eec657 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -175,9 +175,13 @@ static void service_arp_queue(struct netpoll_info *npi) | |||
175 | void netpoll_poll(struct netpoll *np) | 175 | void netpoll_poll(struct netpoll *np) |
176 | { | 176 | { |
177 | struct net_device *dev = np->dev; | 177 | struct net_device *dev = np->dev; |
178 | const struct net_device_ops *ops = dev->netdev_ops; | 178 | const struct net_device_ops *ops; |
179 | |||
180 | if (!dev || !netif_running(dev)) | ||
181 | return; | ||
179 | 182 | ||
180 | if (!dev || !netif_running(dev) || !ops->ndo_poll_controller) | 183 | ops = dev->netdev_ops; |
184 | if (!ops->ndo_poll_controller) | ||
181 | return; | 185 | return; |
182 | 186 | ||
183 | /* Process pending work on NIC */ | 187 | /* Process pending work on NIC */ |