From patchwork Fri Jul 31 21:36:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 38596 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6VLab3s017169 for ; Fri, 31 Jul 2009 21:36:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752950AbZGaVgq (ORCPT ); Fri, 31 Jul 2009 17:36:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753068AbZGaVgq (ORCPT ); Fri, 31 Jul 2009 17:36:46 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:45022 "EHLO g1t0026.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbZGaVgp (ORCPT ); Fri, 31 Jul 2009 17:36:45 -0400 Received: from g4t0018.houston.hp.com (g4t0018.houston.hp.com [16.234.32.27]) by g1t0026.austin.hp.com (Postfix) with ESMTP id C494DC0B3; Fri, 31 Jul 2009 21:36:46 +0000 (UTC) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by g4t0018.houston.hp.com (Postfix) with ESMTP id 895CD1000F; Fri, 31 Jul 2009 21:36:46 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id 585AF39C003; Fri, 31 Jul 2009 15:36:46 -0600 (MDT) X-Virus-Scanned: Debian amavisd-new at ldl.fc.hp.com Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pIK9voyzMj6C; Fri, 31 Jul 2009 15:36:45 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl.fc.hp.com (Postfix) with ESMTP id B7A6C39C009; Fri, 31 Jul 2009 15:36:43 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id AC2A626169; Fri, 31 Jul 2009 15:36:43 -0600 (MDT) Subject: [PATCH 02/19] ACPI: remove null pointer checks in deferred execution path To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org Date: Fri, 31 Jul 2009 15:36:43 -0600 Message-ID: <20090731213643.29930.99159.stgit@bob.kio> In-Reply-To: <20090731213501.29930.39957.stgit@bob.kio> References: <20090731213501.29930.39957.stgit@bob.kio> User-Agent: StGit/0.14.3.386.gb02d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Better to oops and learn about a bug than to silently cover it up. Signed-off-by: Bjorn Helgaas --- drivers/acpi/osl.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 10df23d..fe73e28 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -698,18 +698,12 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */ static void acpi_os_execute_deferred(struct work_struct *work) { struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work); - if (!dpc) { - printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); - return; - } if (dpc->wait) acpi_os_wait_events_complete(NULL); dpc->function(dpc->context); kfree(dpc); - - return; } /******************************************************************************* @@ -738,9 +732,6 @@ static acpi_status __acpi_os_execute(acpi_execute_type type, "Scheduling function [%p(%p)] for deferred execution.\n", function, context)); - if (!function) - return AE_BAD_PARAMETER; - /* * Allocate/initialize DPC structure. Note that this memory will be * freed by the callee. The kernel handles the work_struct list in a