From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:30:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7A1106566C; Mon, 18 Jan 2010 10:30:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8678FC15; Mon, 18 Jan 2010 10:30:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAUBvL031407; Mon, 18 Jan 2010 10:30:11 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAUB3Y031405; Mon, 18 Jan 2010 10:30:11 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181030.o0IAUB3Y031405@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 10:30:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202558 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 10:30:11 -0000 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 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. */