[ivshmem] Fixed issue with rev 0 devices failing to init
@@ -89,6 +89,8 @@ NTSTATUS IVSHMEMEvtDevicePrepareHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIS
++deviceContext->interruptCount;
}
+ if (deviceContext->interruptCount > 0)
+ {
deviceContext->interrupts = (WDFINTERRUPT*)MmAllocateNonCachedMemory(
sizeof(WDFINTERRUPT) * deviceContext->interruptCount);
@@ -97,6 +99,7 @@ NTSTATUS IVSHMEMEvtDevicePrepareHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIS
DEBUG_ERROR("Failed to allocate space for %d interrupts", deviceContext->interrupts);
return STATUS_DEVICE_CONFIGURATION_ERROR;
}
+ }
for (ULONG i = 0; i < resCount; ++i)
{
