From patchwork Fri Feb 19 04:35:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 80529 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1J4ZmQD027111 for ; Fri, 19 Feb 2010 04:35:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707Ab0BSEfr (ORCPT ); Thu, 18 Feb 2010 23:35:47 -0500 Received: from vms173005pub.verizon.net ([206.46.173.5]:36665 "EHLO vms173005pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717Ab0BSEfq (ORCPT ); Thu, 18 Feb 2010 23:35:46 -0500 Received: from localhost.localdomain ([unknown] [74.104.151.18]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0KY2006T2NFAH8K2@vms173005.mailsrvcs.net> for linux-acpi@vger.kernel.org; Thu, 18 Feb 2010 22:35:37 -0600 (CST) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id o1J4ZYpP019332; Thu, 18 Feb 2010 23:35:34 -0500 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) with ESMTP id o1J4ZXEc019328; Thu, 18 Feb 2010 23:35:33 -0500 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Thu, 18 Feb 2010 23:35:33 -0500 (EST) From: Len Brown X-X-Sender: lenb@localhost.localdomain To: stable@kernel.org Cc: linux-acpi@vger.kernel.org, Thomas Renninger Subject: [PATCH 2.6.32.stable] ACPI: Add NULL pointer check in acpi_bus_start Message-id: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Feb 2010 04:35:49 +0000 (UTC) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index ff9f622..8044583 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1357,6 +1357,9 @@ int acpi_bus_start(struct acpi_device *device) { struct acpi_bus_ops ops; + if (!device) + return -EINVAL; + memset(&ops, 0, sizeof(ops)); ops.acpi_op_start = 1;