Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Treat empty package returned from _AL<n> method...



details:   https://anonhg.NetBSD.org/src/rev/d1f4c28be4e8
branches:  trunk
changeset: 780298:d1f4c28be4e8
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 19 18:03:32 2012 +0000

description:
Treat empty package returned from _AL<n> method the same as non-existent.
>From jmcneill.

diffstat:

 sys/dev/acpi/acpi_tz.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ecf938cda140 -r d1f4c28be4e8 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c    Thu Jul 19 17:48:55 2012 +0000
+++ b/sys/dev/acpi/acpi_tz.c    Thu Jul 19 18:03:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.85 2012/02/02 19:43:02 tls Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.86 2012/07/19 18:03:32 christos Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.85 2012/02/02 19:43:02 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.86 2012/07/19 18:03:32 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -536,7 +536,7 @@
 
                obj = sc->sc_zone.al[i].Pointer;
 
-               if (obj->Type != ACPI_TYPE_PACKAGE) {
+               if (obj->Type != ACPI_TYPE_PACKAGE || obj->Package.Count == 0) {
                        sc->sc_zone.al[i].Pointer = NULL;
                        ACPI_FREE(obj);
                        continue;



Home | Main Index | Thread Index | Old Index