svn commit: r202558 - head/sys/dev/acpica
Andriy Gapon
avg at FreeBSD.org
Mon Jan 18 10:30:11 UTC 2010
Author: avg
Date: Mon Jan 18 10:30:11 2010
New Revision: 202558
URL: http://svn.freebsd.org/changeset/base/202558
Log:
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 at comcast.net>
MFC after: 4 days
Modified:
head/sys/dev/acpica/acpi_ec.c
Modified: head/sys/dev/acpica/acpi_ec.c
==============================================================================
--- head/sys/dev/acpica/acpi_ec.c Mon Jan 18 10:29:04 2010 (r202557)
+++ head/sys/dev/acpica/acpi_ec.c Mon Jan 18 10:30:11 2010 (r202558)
@@ -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. */
More information about the svn-src-all
mailing list