From 6d2566752f9629820d72b964d6040130fcc61264 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 15 Aug 2011 07:46:02 +0000 Subject: [PATCH] [ACPI] - Don't assume that acpi_evaluate_reference will always complete successfully svn path=/trunk/; revision=53260 --- reactos/drivers/bus/acpi/busmgr/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/bus/acpi/busmgr/bus.c b/reactos/drivers/bus/acpi/busmgr/bus.c index e7901d21132..d9b3241a0c0 100644 --- a/reactos/drivers/bus/acpi/busmgr/bus.c +++ b/reactos/drivers/bus/acpi/busmgr/bus.c @@ -401,9 +401,9 @@ acpi_bus_get_power_flags ( char object_name[5] = {'_','P','R','0'+i,'\0'}; /* Evaluate "_PRx" to se if power resources are referenced */ - acpi_evaluate_reference(device->handle, object_name, NULL, + status = acpi_evaluate_reference(device->handle, object_name, NULL, &ps->resources); - if (ps->resources.count) { + if (ACPI_SUCCESS(status) && ps->resources.count) { device->power.flags.power_resources = 1; ps->flags.valid = 1; }