diff options
author | sephe <sephe@FreeBSD.org> | 2016-04-11 06:59:13 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-04-11 06:59:13 +0000 |
commit | 5aac05162c339436db8f586aef69d4c6c4d5d889 (patch) | |
tree | 1ffb86de842700883006aba8847be8f6caf71b37 /sys/dev/hyperv/netvsc/hv_net_vsc.c | |
parent | 07c17a9d10ed0669b7e63d2f72e49d7bde32b10b (diff) | |
download | FreeBSD-src-5aac05162c339436db8f586aef69d4c6c4d5d889.zip FreeBSD-src-5aac05162c339436db8f586aef69d4c6c4d5d889.tar.gz |
hyperv/hn: Remove unnecessary NULL checks
Submitted by: Jun Su <junsu microsoft com>
Reviewed by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5905
Diffstat (limited to 'sys/dev/hyperv/netvsc/hv_net_vsc.c')
-rw-r--r-- | sys/dev/hyperv/netvsc/hv_net_vsc.c | 6 |
1 files changed, 2 insertions, 4 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); } |