[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 3 May 2015 18:13:16 +0000 (18:13 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 3 May 2015 18:13:16 +0000 (18:13 +0000)
An IRP context without an IRP sounds like a challenge...

svn path=/trunk/; revision=67536

reactos/drivers/filesystems/ntfs/misc.c

index 5d17e1a..128f787 100644 (file)
@@ -83,16 +83,10 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
     IrpContext->Identifier.Size = sizeof(NTFS_IRP_CONTEXT);
     IrpContext->Irp = Irp;
     IrpContext->DeviceObject = DeviceObject;
-
-    if (Irp)
-    {
-        IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
-        ASSERT(IoStackLocation);
-
-        IrpContext->MajorFunction = IoStackLocation->MajorFunction;
-        IrpContext->MinorFunction = IoStackLocation->MinorFunction;
-        IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp);
-    }
+    IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
+    IrpContext->MajorFunction = IoStackLocation->MajorFunction;
+    IrpContext->MinorFunction = IoStackLocation->MinorFunction;
+    IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp);
 
     return IrpContext;
 }