- Remove some dead code in acpi_system_add. CID 502179
- Define deviceName only in debug builds in Bus_AddDevice. CID 502180

svn path=/trunk/; revision=74696
This commit is contained in:
Thomas Faber 2017-05-29 09:23:33 +00:00
parent 8f2963ab01
commit c4393987a1
2 changed files with 4 additions and 6 deletions

View file

@ -65,7 +65,6 @@ static int
acpi_system_add (
struct acpi_device *device)
{
int result = 0;
ACPI_STATUS status = AE_OK;
struct acpi_system *system = NULL;
UINT8 i = 0;
@ -114,10 +113,7 @@ acpi_system_add (
// }
//#endif
if (result)
ExFreePoolWithTag(system, 'IPCA');
return_VALUE(result);
return_VALUE(0);
}
static int

View file

@ -37,8 +37,8 @@ Bus_AddDevice(
NTSTATUS status;
PDEVICE_OBJECT deviceObject = NULL;
PFDO_DEVICE_DATA deviceData = NULL;
PWCHAR deviceName = NULL;
#ifndef NDEBUG
PWCHAR deviceName = NULL;
ULONG nameLength;
#endif
@ -159,9 +159,11 @@ Bus_AddDevice(
deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
End:
#ifndef NDEBUG
if (deviceName){
ExFreePoolWithTag(deviceName, 'MpcA');
}
#endif
if (!NT_SUCCESS(status) && deviceObject){
if (deviceData && deviceData->NextLowerDriver){
IoDetachDevice (deviceData->NextLowerDriver);