summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-12-18 17:04:11 +0000
committerkan <kan@FreeBSD.org>2003-12-18 17:04:11 +0000
commit0b3829726cd4eb51150e562d2dbf2c44e1a0f159 (patch)
tree39cf11c7e381c39cc7915a6a9fe6b04cf6784cf6 /sys/dev/acpica
parent077011779a6cfc14f4b8c91a6c5a98c2566dad0a (diff)
downloadFreeBSD-src-0b3829726cd4eb51150e562d2dbf2c44e1a0f159.zip
FreeBSD-src-0b3829726cd4eb51150e562d2dbf2c44e1a0f159.tar.gz
Initialize acpi buffer structs early in order to avoid freeing
unallocated pointers later in done: section.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_pcib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c
index b3ebbfa..065d5a6 100644
--- a/sys/dev/acpica/acpi_pcib.c
+++ b/sys/dev/acpica/acpi_pcib.c
@@ -125,6 +125,9 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+ buf.Pointer = NULL;
+ crsbuf.Pointer = NULL;
+ prsbuf.Pointer = NULL;
interrupt = 255;
/* ACPI numbers pins 0-3, not 1-4 like the BIOS */
@@ -184,7 +187,6 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
/*
* Verify that this is a PCI link device, and that it's present.
*/
- buf.Pointer = NULL;
buf.Length = ACPI_ALLOCATE_BUFFER;
if (ACPI_FAILURE(AcpiGetObjectInfo(lnkdev, &buf))) {
device_printf(pcib, "couldn't validate PCI interrupt link device %s\n",
@@ -210,14 +212,12 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
/*
* Get the current and possible resources for the interrupt link device.
*/
- crsbuf.Pointer = NULL;
crsbuf.Length = ACPI_ALLOCATE_BUFFER;
if (ACPI_FAILURE(status = AcpiGetCurrentResources(lnkdev, &crsbuf))) {
device_printf(pcib, "couldn't get PCI interrupt link device _CRS data - %s\n",
AcpiFormatException(status));
goto out; /* this is fatal */
}
- prsbuf.Pointer = NULL;
prsbuf.Length = ACPI_ALLOCATE_BUFFER;
if (ACPI_FAILURE(status = AcpiGetPossibleResources(lnkdev, &prsbuf))) {
device_printf(pcib, "couldn't get PCI interrupt link device _PRS data - %s\n",
OpenPOWER on IntegriCloud