Commit in reactos/ntoskrnl/io on MAIN
pnpmgr.c+9-61.25 -> 1.26
- Minor correction to IopGetSystemPowerDeviceObject.

reactos/ntoskrnl/io
pnpmgr.c 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- pnpmgr.c	18 Mar 2004 16:43:56 -0000	1.25
+++ pnpmgr.c	20 Mar 2004 17:34:25 -0000	1.26
@@ -1,4 +1,4 @@
-/* $Id: pnpmgr.c,v 1.25 2004/03/18 16:43:56 navaraf Exp $
+/* $Id: pnpmgr.c,v 1.26 2004/03/20 17:34:25 navaraf Exp $
  *
  * COPYRIGHT:      See COPYING in the top level directory
  * PROJECT:        ReactOS kernel
@@ -240,13 +240,16 @@
 {
   KIRQL OldIrql;
 
-  assert(PopSystemPowerDeviceNode);
+  if (PopSystemPowerDeviceNode)
+  {
+    KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
+    *DeviceObject = PopSystemPowerDeviceNode->Pdo;
+    KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql);
 
-  KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
-  *DeviceObject = PopSystemPowerDeviceNode->Pdo;
-  KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql);
+    return STATUS_SUCCESS;
+  }
 
-  return STATUS_SUCCESS;
+  return STATUS_UNSUCCESSFUL;
 }
 
 /**********************************************************************
CVSspam 0.2.8