diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1705,9 +1705,9 @@ if (res == NULL && start + count - 1 == end) res = bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags); - if (res) { - device_printf(dev,"vmbus_pcib_alloc_resource is successful\n"); - } + if (res == NULL) + device_printf(dev, "vmbus_pcib_alloc_resource failed\n"); + return (res); }