Author: sephe Date: Wed Apr 13 09:20:29 2016 New Revision: 297913 URL: https://svnweb.freebsd.org/changeset/base/297913
Log: hyperv: device_get_softc does not return NULL MFC after: 1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Apr 13 07:04:04 2016 (r297912) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Apr 13 09:20:29 2016 (r297913) @@ -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_dev { hn_softc_t *sc = device_get_softc(device_obj->device); - if (sc == NULL) { - return; - } - if (status == 1) { sc->hn_carrier = 1; } else { Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Apr 13 07:04:04 2016 (r297912) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Apr 13 09:20:29 2016 (r297913) @@ -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); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"