[COMPBATT] Add a missing OBJ_KERNEL_HANDLE
[reactos.git] / drivers / bus / acpi / compbatt / compmisc.c
index 337c521..e84a251 100644 (file)
@@ -84,7 +84,11 @@ CompBattGetDeviceObjectPointer(IN PUNICODE_STRING DeviceName,
     PAGED_CODE();
 
     /* Open a file object handle to the device */
-    InitializeObjectAttributes(&ObjectAttributes, DeviceName, 0, NULL, NULL);
+    InitializeObjectAttributes(&ObjectAttributes,
+                               DeviceName,
+                               OBJ_KERNEL_HANDLE,
+                               NULL,
+                               NULL);
     Status = ZwCreateFile(&DeviceHandle,
                           DesiredAccess,
                           &ObjectAttributes,