summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_ec.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-01-18 10:30:11 +0000
committeravg <avg@FreeBSD.org>2010-01-18 10:30:11 +0000
commit7651eba9b11e2f3296eeb30804767f6f751617b2 (patch)
tree5ba044e962a9803c20379a00a1b1e7e0c24dd612 /sys/dev/acpica/acpi_ec.c
parent553c4a5e4f365e0af1a88fb033ffdac2fe4c4f0b (diff)
downloadFreeBSD-src-7651eba9b11e2f3296eeb30804767f6f751617b2.zip
FreeBSD-src-7651eba9b11e2f3296eeb30804767f6f751617b2.tar.gz
acpi_ec: clean up 'private' ivar when freeing memory to which it points
This is not only a prudent thing to do, but also makes sure that probe method is not confused by non-NULL 'private', if the previous attach attempt fails for any reason. PR: kern/142561 Tested by: Alex Goncharov <alex-goncharov@comcast.net> MFC after: 4 days
Diffstat (limited to 'sys/dev/acpica/acpi_ec.c')
-rw-r--r--sys/dev/acpica/acpi_ec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index b339ba1..c101292 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -469,6 +469,7 @@ acpi_ec_attach(device_t dev)
sc->ec_gpehandle = params->gpe_handle;
sc->ec_uid = params->uid;
sc->ec_suspending = FALSE;
+ acpi_set_private(dev, NULL);
free(params, M_TEMP);
/* Attach bus resources for data and command/status ports. */
OpenPOWER on IntegriCloud