[dummy] Don't try to grant a PDO without the main bus
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Mon, 3 Jan 2011 05:04:53 +0000 (00:04 -0500)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Mon, 3 Jan 2011 05:04:53 +0000 (00:04 -0500)
src/winvblock/dummy.c

index 2270b43..4f4aa57 100644 (file)
@@ -188,6 +188,9 @@ WVL_M_LIB NTSTATUS STDCALL WvDummyAdd(
     if (!DummyIds)
       return STATUS_INVALID_PARAMETER;
 
     if (!DummyIds)
       return STATUS_INVALID_PARAMETER;
 
+    if (!WvBus.Fdo)
+      return STATUS_NO_SUCH_DEVICE;
+
     KeInitializeEvent(&event, SynchronizationEvent, FALSE);
 
     status = WvlBusEnqueueCustomWorkItem(&WvBus, &work_item);
     KeInitializeEvent(&event, SynchronizationEvent, FALSE);
 
     status = WvlBusEnqueueCustomWorkItem(&WvBus, &work_item);