Commit in reactos/ntoskrnl/io on MAIN
driver.c+3-31.56 -> 1.57
- Check the return value of LdrProcessModule instead of uninitialized variable.

reactos/ntoskrnl/io
driver.c 1.56 -> 1.57
diff -u -r1.56 -r1.57
--- driver.c	9 Dec 2004 14:20:06 -0000	1.56
+++ driver.c	23 Dec 2004 23:33:54 -0000	1.57
@@ -1,4 +1,4 @@
-/* $Id: driver.c,v 1.56 2004/12/09 14:20:06 royce Exp $
+/* $Id: driver.c,v 1.57 2004/12/23 23:33:54 navaraf Exp $
  *
  * COPYRIGHT:      See COPYING in the top level directory
  * PROJECT:        ReactOS kernel
@@ -1126,12 +1126,12 @@
       FileNameWithoutPath);
    Status = LdrProcessModule(ModuleLoadBase, &DeviceNode->ServiceName,
       &ModuleObject);
-   if (ModuleObject == NULL)
+   if (!NT_SUCCESS(Status))
    {
       if (ModuleDeviceNode == NULL)
          IopFreeDeviceNode(DeviceNode);
       CPRINT("Driver load failed, status (%x)\n", Status);
-      return STATUS_UNSUCCESSFUL;
+      return Status;
    }
 
    /*
CVSspam 0.2.8