Index: sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c =================================================================== --- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -978,14 +978,14 @@ sc = device_get_softc(dev); if (sc == NULL) { ret = ENOMEM; - goto cleanup; + return (ret); } stor_type = storvsc_get_storage_type(dev); if (stor_type == DRIVER_UNKNOWN) { ret = ENODEV; - goto cleanup; + return (ret); } bzero(sc, sizeof(struct storvsc_softc)); Index: sys/dev/hyperv/vmbus/hv_channel.c =================================================================== --- sys/dev/hyperv/vmbus/hv_channel.c +++ sys/dev/hyperv/vmbus/hv_channel.c @@ -572,7 +572,7 @@ ("Error VMBUS: malloc failed to allocate Gpadl Teardown Msg!")); if (info == NULL) { ret = ENOMEM; - goto cleanup; + return (ret); } sema_init(&info->wait_sema, 0, "Open Info Sema");