aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hyperv
diff options
context:
space:
mode:
authorSepherosa Ziehau <sephe@FreeBSD.org>2016-04-13 09:20:29 +0000
committerSepherosa Ziehau <sephe@FreeBSD.org>2016-04-13 09:20:29 +0000
commit7e98851e930f1c34602446bf64527910902e2b8e (patch)
tree6ae5deba945ed82ec730c704719fb3c8bbf519c2 /sys/dev/hyperv
parent5f2638dabbe6e770f2de14a157e9e94541fb8f0f (diff)
Notes
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r--sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c7
-rw-r--r--sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c7
2 files changed, 0 insertions, 14 deletions
diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
index 68c301a32e0a4..933f4543d4ad9 100644
--- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -418,9 +418,6 @@ netvsc_attach(device_t dev)
#endif
sc = device_get_softc(dev);
- if (sc == NULL) {
- return (ENOMEM);
- }
bzero(sc, sizeof(hn_softc_t));
sc->hn_unit = unit;
@@ -1169,10 +1166,6 @@ netvsc_linkstatus_callback(struct hv_device *device_obj, uint32_t status)
{
hn_softc_t *sc = device_get_softc(device_obj->device);
- if (sc == NULL) {
- return;
- }
-
if (status == 1) {
sc->hn_carrier = 1;
} else {
diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
index 9537c84c978c9..38f2f28461ab1 100644
--- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -293,9 +293,6 @@ get_stor_device(struct hv_device *device,
struct storvsc_softc *sc;
sc = device_get_softc(device->device);
- if (sc == NULL) {
- return NULL;
- }
if (outbound) {
/*
@@ -976,10 +973,6 @@ storvsc_attach(device_t dev)
root_mount_token = root_mount_hold("storvsc");
sc = device_get_softc(dev);
- if (sc == NULL) {
- ret = ENOMEM;
- goto cleanup;
- }
stor_type = storvsc_get_storage_type(dev);