summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-01-04 06:35:01 +0000
committernjl <njl@FreeBSD.org>2004-01-04 06:35:01 +0000
commit0a33e354f93a05661e6afc4245e252b349caa8a2 (patch)
treed59824bc8b64247ff2e0e8cc2990b31a0fba05e8 /sys/contrib
parent55f060d610578984cb21903df0497679484af820 (diff)
downloadFreeBSD-src-0a33e354f93a05661e6afc4245e252b349caa8a2.zip
FreeBSD-src-0a33e354f93a05661e6afc4245e252b349caa8a2.tar.gz
Fix for "UtAllocate: Attempt to allocate zero bytes" warnings on Dell
laptops that resulted in problems reading battery status. Don't copy Buffers, Packages, or Regions in DsStoreObjectToLocal(). Tested by: scottl, sam Submitted by: Luming Yu (Intel)
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/acpica/dsmthdat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/dsmthdat.c b/sys/contrib/dev/acpica/dsmthdat.c
index ac5254b..30bb0a2 100644
--- a/sys/contrib/dev/acpica/dsmthdat.c
+++ b/sys/contrib/dev/acpica/dsmthdat.c
@@ -663,6 +663,7 @@ AcpiDsStoreObjectToLocal (
ACPI_NAMESPACE_NODE *Node;
ACPI_OPERAND_OBJECT *CurrentObjDesc;
ACPI_OPERAND_OBJECT *NewObjDesc;
+ UINT8 ObjType;
ACPI_FUNCTION_TRACE ("DsStoreObjectToLocal");
@@ -697,7 +698,11 @@ AcpiDsStoreObjectToLocal (
* take a copy of the object before we store.
*/
NewObjDesc = ObjDesc;
- if (ObjDesc->Common.ReferenceCount > 1)
+ ObjType = ACPI_GET_OBJECT_TYPE(ObjDesc);
+ if (ObjDesc->Common.ReferenceCount > 1 &&
+ ObjType != ACPI_TYPE_BUFFER &&
+ ObjType != ACPI_TYPE_PACKAGE &&
+ ObjType != ACPI_TYPE_REGION)
{
Status = AcpiUtCopyIobjectToIobject (ObjDesc, &NewObjDesc, WalkState);
if (ACPI_FAILURE (Status))
OpenPOWER on IntegriCloud