All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Subject: [PATCH 02/19] ACPI: remove null pointer checks in deferred execution path
Date: Fri, 31 Jul 2009 15:36:43 -0600	[thread overview]
Message-ID: <20090731213643.29930.99159.stgit@bob.kio> (raw)
In-Reply-To: <20090731213501.29930.39957.stgit@bob.kio>

Better to oops and learn about a bug than to silently cover it up.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---
 drivers/acpi/osl.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

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


  parent reply	other threads:[~2009-07-31 21:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 21:36 [PATCH 00/19] ACPI: cleanups for hotplug Bjorn Helgaas
2009-07-31 21:36 ` [PATCH 01/19] ACPI: simplify deferred execution path Bjorn Helgaas
2009-07-31 21:36 ` Bjorn Helgaas [this message]
2009-07-31 21:36 ` [PATCH 03/19] ACPI: don't pass handle for fixed hardware notifications Bjorn Helgaas
2009-07-31 21:36 ` [PATCH 04/19] ACPI: add debug for device addition Bjorn Helgaas
2009-07-31 21:36 ` [PATCH 05/19] ACPI: remove unused acpi_bus_scan_fixed() argument Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 06/19] ACPI: remove redundant "handle" and "parent" arguments Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 07/19] ACPI: save device_type in acpi_device Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 08/19] ACPI: use device_type rather than comparing HID Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 09/19] ACPI: remove acpi_device_set_context() "type" argument Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 10/19] ACPI: remove redundant "type" arguments Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 11/19] ACPI: remove unnecessary argument checking Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 12/19] ACPI: add acpi_bus_get_parent() and remove "parent" arguments Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 13/19] ACPI: convert acpi_bus_scan() to operate on an acpi_handle Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 14/19] ACPI: enumerate namespace before adding functional fixed hardware devices Bjorn Helgaas
2009-07-31 21:37 ` [PATCH 15/19] ACPI: identify device tree root by null parent pointer, not ACPI_BUS_TYPE Bjorn Helgaas
2009-08-02 14:44   ` Len Brown
2009-07-31 21:37 ` [PATCH 16/19] ACPI: use acpi_walk_namespace() to enumerate devices Bjorn Helgaas
2009-07-31 21:38 ` [PATCH 17/19] ACPI: add acpi_bus_get_status_handle() Bjorn Helgaas
2009-07-31 21:38 ` [PATCH 18/19] ACPI: factor out device type and status checking Bjorn Helgaas
2009-07-31 21:38 ` [PATCH 19/19] ACPI: handle re-enumeration, when acpi_devices might already exist Bjorn Helgaas
2009-08-02 15:12 ` [PATCH 00/19] ACPI: cleanups for hotplug Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090731213643.29930.99159.stgit@bob.kio \
    --to=bjorn.helgaas@hp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.