diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/hyperv/netvsc/hv_net_vsc.c | 6 | ||||
-rw-r--r-- | sys/dev/hyperv/netvsc/hv_rndis_filter.c | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/hyperv/netvsc/hv_net_vsc.c b/sys/dev/hyperv/netvsc/hv_net_vsc.c index f6d7d9e..11b3435 100644 --- a/sys/dev/hyperv/netvsc/hv_net_vsc.c +++ b/sys/dev/hyperv/netvsc/hv_net_vsc.c @@ -742,10 +742,8 @@ cleanup: * Free the packet buffers on the netvsc device packet queue. * Release other resources. */ - if (net_dev) { - sema_destroy(&net_dev->channel_init_sema); - free(net_dev, M_NETVSC); - } + sema_destroy(&net_dev->channel_init_sema); + free(net_dev, M_NETVSC); return (NULL); } diff --git a/sys/dev/hyperv/netvsc/hv_rndis_filter.c b/sys/dev/hyperv/netvsc/hv_rndis_filter.c index 1eb24fa..19da7e5 100644 --- a/sys/dev/hyperv/netvsc/hv_rndis_filter.c +++ b/sys/dev/hyperv/netvsc/hv_rndis_filter.c @@ -405,8 +405,7 @@ hv_rf_send_offload_request(struct hv_device *device, } cleanup: - if (request) - hv_put_rndis_request(rndis_dev, request); + hv_put_rndis_request(rndis_dev, request); return (ret); } @@ -907,10 +906,8 @@ hv_rf_halt_device(rndis_device *device) } device->state = RNDIS_DEV_UNINITIALIZED; - - if (request != NULL) { - hv_put_rndis_request(device, request); - } + + hv_put_rndis_request(device, request); return (0); } |