Return directly the driver error code

This commit is contained in:
Alex 2023-03-08 05:09:40 +02:00
parent 9a1a7b9955
commit a265cb59c8
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -435,61 +435,19 @@ namespace Driver
switch (fexExtended->Driver.Type)
{
case FexDriverType::FexDriverType_Generic:
{
DriverCode ret = BindPCIGeneric(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCIGeneric(mem, fex, PCIDevice);
case FexDriverType::FexDriverType_Display:
{
DriverCode ret = BindPCIDisplay(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCIDisplay(mem, fex, PCIDevice);
case FexDriverType::FexDriverType_Network:
{
DriverCode ret = BindPCINetwork(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCINetwork(mem, fex, PCIDevice);
case FexDriverType::FexDriverType_Storage:
{
DriverCode ret = BindPCIStorage(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCIStorage(mem, fex, PCIDevice);
case FexDriverType::FexDriverType_FileSystem:
{
DriverCode ret = BindPCIFileSystem(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCIFileSystem(mem, fex, PCIDevice);
case FexDriverType::FexDriverType_Input:
{
DriverCode ret = BindPCIInput(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCIInput(mem, fex, PCIDevice);
case FexDriverType::FexDriverType_Audio:
{
DriverCode ret = BindPCIAudio(mem, fex, PCIDevice);
if (ret != DriverCode::OK &&
ret != DriverCode::DRIVER_CONFLICT)
continue;
return DriverCode::OK;
}
return BindPCIAudio(mem, fex, PCIDevice);
default:
{
warn("Unknown driver type: %d", fexExtended->Driver.Type);