mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 01:10:26 +00:00
[VIDEOPRT] Correctly return failure when adapter can't be found
This was wrong in both call chains (PNP case or legacy case) HwFindAdapter returns a VP_STATUS, while we were expecting a NTSTATUS. CORE-17789
This commit is contained in:
parent
87b74f2901
commit
807af6a4d1
1 changed files with 8 additions and 11 deletions
|
@ -345,6 +345,7 @@ IntVideoPortFindAdapter(
|
||||||
{
|
{
|
||||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
VP_STATUS vpStatus;
|
||||||
VIDEO_PORT_CONFIG_INFO ConfigInfo;
|
VIDEO_PORT_CONFIG_INFO ConfigInfo;
|
||||||
SYSTEM_BASIC_INFORMATION SystemBasicInfo;
|
SYSTEM_BASIC_INFORMATION SystemBasicInfo;
|
||||||
UCHAR Again = FALSE;
|
UCHAR Again = FALSE;
|
||||||
|
@ -405,32 +406,27 @@ IntVideoPortFindAdapter(
|
||||||
DriverExtension->InitializationData.HwDeviceExtensionSize);
|
DriverExtension->InitializationData.HwDeviceExtensionSize);
|
||||||
|
|
||||||
/* FIXME: Need to figure out what string to pass as param 3. */
|
/* FIXME: Need to figure out what string to pass as param 3. */
|
||||||
Status = DriverExtension->InitializationData.HwFindAdapter(
|
vpStatus = DriverExtension->InitializationData.HwFindAdapter(
|
||||||
&DeviceExtension->MiniPortDeviceExtension,
|
&DeviceExtension->MiniPortDeviceExtension,
|
||||||
DriverExtension->HwContext,
|
DriverExtension->HwContext,
|
||||||
NULL,
|
NULL,
|
||||||
&ConfigInfo,
|
&ConfigInfo,
|
||||||
&Again);
|
&Again);
|
||||||
|
|
||||||
if (Status == ERROR_DEV_NOT_EXIST)
|
if (vpStatus == ERROR_DEV_NOT_EXIST)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (Status == NO_ERROR)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERR_(VIDEOPRT, "HwFindAdapter call failed with error 0x%X\n", Status);
|
break;
|
||||||
goto Failure;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* FIXME: Need to figure out what string to pass as param 3. */
|
/* FIXME: Need to figure out what string to pass as param 3. */
|
||||||
Status = DriverExtension->InitializationData.HwFindAdapter(
|
vpStatus = DriverExtension->InitializationData.HwFindAdapter(
|
||||||
&DeviceExtension->MiniPortDeviceExtension,
|
&DeviceExtension->MiniPortDeviceExtension,
|
||||||
DriverExtension->HwContext,
|
DriverExtension->HwContext,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -438,9 +434,10 @@ IntVideoPortFindAdapter(
|
||||||
&Again);
|
&Again);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Status != NO_ERROR)
|
if (vpStatus != NO_ERROR)
|
||||||
{
|
{
|
||||||
ERR_(VIDEOPRT, "HwFindAdapter call failed with error 0x%X\n", Status);
|
ERR_(VIDEOPRT, "HwFindAdapter call failed with error 0x%X\n", vpStatus);
|
||||||
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
goto Failure;
|
goto Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue