[VIDEOPRT] Correctly return failure in IRP_MJ_CREATE when HwInitialize fails

CORE-17789
This commit is contained in:
Hervé Poussineau 2021-10-13 08:01:20 +02:00
parent 807af6a4d1
commit ea8cbbd4ca

View file

@ -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;
}
/*