https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ea8cbbd4caf4f2b7ff6ea…
commit ea8cbbd4caf4f2b7ff6ea79f8d9b615d54917a58
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Wed Oct 13 08:01:20 2021 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Thu Oct 14 23:39:31 2021 +0200
[VIDEOPRT] Correctly return failure in IRP_MJ_CREATE when HwInitialize fails
CORE-17789
---
win32ss/drivers/videoprt/dispatch.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/win32ss/drivers/videoprt/dispatch.c b/win32ss/drivers/videoprt/dispatch.c
index f80abe8c4f7..6ab73148530 100644
--- a/win32ss/drivers/videoprt/dispatch.c
+++ b/win32ss/drivers/videoprt/dispatch.c
@@ -405,18 +405,19 @@ IntVideoPortDispatchOpen(
if
(DriverExtension->InitializationData.HwInitialize(&DeviceExtension->MiniPortDeviceExtension))
{
- Irp->IoStatus.Status = STATUS_SUCCESS;
+ Status = STATUS_SUCCESS;
InterlockedIncrement((PLONG)&DeviceExtension->DeviceOpened);
}
else
{
- Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
+ Status = STATUS_UNSUCCESSFUL;
}
+ Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = FILE_OPENED;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return STATUS_SUCCESS;
+ return Status;
}
/*