- DeviceExtension should be NULL if the caller didn't specify any size for one.

svn path=/trunk/; revision=17084
This commit is contained in:
Alex Ionescu 2005-08-05 21:16:51 +00:00
parent 3d09f34d49
commit 6477828cdd

View file

@ -503,7 +503,9 @@ IoCreateDevice(PDRIVER_OBJECT DriverObject,
/* Set Device Object Data */
CreatedDeviceObject->DeviceType = DeviceType;
CreatedDeviceObject->Characteristics = DeviceCharacteristics;
CreatedDeviceObject->DeviceExtension = CreatedDeviceObject + 1;
CreatedDeviceObject->DeviceExtension = DeviceExtensionSize ?
CreatedDeviceObject + 1 :
NULL;
CreatedDeviceObject->StackSize = 1;
CreatedDeviceObject->AlignmentRequirement = 1; /* FIXME */