diff options
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 4c1d8cca247b..8dd0b8770328 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c | |||
@@ -1231,8 +1231,11 @@ void netvsc_channel_cb(void *context) | |||
1231 | return; | 1231 | return; |
1232 | 1232 | ||
1233 | net_device = net_device_to_netvsc_device(ndev); | 1233 | net_device = net_device_to_netvsc_device(ndev); |
1234 | if (unlikely(net_device->destroy) && | 1234 | if (unlikely(!net_device)) |
1235 | netvsc_channel_idle(net_device, q_idx)) | 1235 | return; |
1236 | |||
1237 | if (unlikely(net_device->destroy && | ||
1238 | netvsc_channel_idle(net_device, q_idx))) | ||
1236 | return; | 1239 | return; |
1237 | 1240 | ||
1238 | /* commit_rd_index() -> hv_signal_on_read() needs this. */ | 1241 | /* commit_rd_index() -> hv_signal_on_read() needs this. */ |