All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] WMI: remove EC region handler when _WDG parsing fails
@ 2010-08-26  7:14 Dmitry Torokhov
  2010-08-26  7:14 ` [PATCH 02/10] WMI: free wmi blocks when parse_wdg() fails Dmitry Torokhov
                   ` (10 more replies)
  0 siblings, 11 replies; 21+ messages in thread
From: Dmitry Torokhov @ 2010-08-26  7:14 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Carlos Corbacho, platform-driver-x86

Driver initialization was forgetting to remove EC address space handler
in cases when parse_wdg() method failed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/platform/x86/wmi.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index b2978a0..7a77f03 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -968,12 +968,17 @@ static int acpi_wmi_add(struct acpi_device *device)
 						    ACPI_ADR_SPACE_EC,
 						    &acpi_wmi_ec_space_handler,
 						    NULL, NULL);
-	if (ACPI_FAILURE(status))
+	if (ACPI_FAILURE(status)) {
+		printk(KERN_ERR PREFIX "Error installing EC region handler\n");
 		return -ENODEV;
+	}
 
 	status = parse_wdg(device->handle);
 	if (ACPI_FAILURE(status)) {
-		printk(KERN_ERR PREFIX "Error installing EC region handler\n");
+		acpi_remove_address_space_handler(device->handle,
+						  ACPI_ADR_SPACE_EC,
+						  &acpi_wmi_ec_space_handler);
+		printk(KERN_ERR PREFIX "Failed to parse WDG method\n");
 		return -ENODEV;
 	}
 

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2010-10-01 17:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26  7:14 [PATCH 01/10] WMI: remove EC region handler when _WDG parsing fails Dmitry Torokhov
2010-08-26  7:14 ` [PATCH 02/10] WMI: free wmi blocks when parse_wdg() fails Dmitry Torokhov
2010-09-12 17:19   ` Carlos Corbacho
2010-08-26  7:14 ` [PATCH 03/10] WMI: fix wmi_gtoa() to actully terminate the string Dmitry Torokhov
2010-09-12 17:28   ` Carlos Corbacho
2010-08-26  7:14 ` [PATCH 04/10] WMI: do not leak memory in parse_wdg() Dmitry Torokhov
2010-09-12 17:29   ` Carlos Corbacho
2010-08-26  7:15 ` [PATCH 05/10] WMI: fix potential NULL pointer dereference Dmitry Torokhov
2010-09-12 17:30   ` Carlos Corbacho
2010-08-26  7:15 ` [PATCH 06/10] WMI: simplify handling of returned WMI blocks in parse_wdg() Dmitry Torokhov
2010-09-12 17:39   ` Carlos Corbacho
2010-08-26  7:15 ` [PATCH 07/10] WMI: use separate list head for storing wmi blocks Dmitry Torokhov
2010-09-12 17:40   ` Carlos Corbacho
2010-08-26  7:15 ` [PATCH 08/10] WMI: use pr_err() and friends Dmitry Torokhov
2010-09-12 17:42   ` Carlos Corbacho
2010-08-26  7:15 ` [PATCH 09/10] WMI: make use of class device's attributres Dmitry Torokhov
2010-09-12 17:50   ` Carlos Corbacho
2010-08-26  7:15 ` [PATCH 10/10] WMI: embed struct device directly into wmi_block Dmitry Torokhov
2010-09-12  7:29 ` [PATCH 01/10] WMI: remove EC region handler when _WDG parsing fails Dmitry Torokhov
2010-09-12 17:14 ` Carlos Corbacho
2010-10-01 17:00   ` Dmitry Torokhov

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.