From mboxrd@z Thu Jan 1 00:00:00 1970 From: Len Brown Subject: [PATCH 11/19] eeepc-laptop: unregister_rfkill_notifier on failure Date: Sat, 16 May 2009 02:02:08 -0400 Message-ID: References: <1242453736-20763-1-git-send-email-lenb@kernel.org> Return-path: Received: from vms173003pub.verizon.net ([206.46.173.3]:10610 "EHLO vms173003pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752143AbZEPGCX (ORCPT ); Sat, 16 May 2009 02:02:23 -0400 Received: from localhost.localdomain ([96.237.168.40]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KJQ00B383G0E8GX@vms173003.mailsrvcs.net> for linux-acpi@vger.kernel.org; Sat, 16 May 2009 01:02:24 -0500 (CDT) In-reply-to: <1242453736-20763-1-git-send-email-lenb@kernel.org> In-reply-to: <45cb50e646d1560eff01c5ad0f0df3c7fd6148dd.1242453625.git.len.brown@intel.com> References: <45cb50e646d1560eff01c5ad0f0df3c7fd6148dd.1242453625.git.len.brown@intel.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-acpi@vger.kernel.org Cc: Corentin Chary , Len Brown From: Corentin Chary If there is a failure during eeepc_hotk_add() we need to remove the acpi_notify_handler. Signed-off-by: Corentin Chary Signed-off-by: Len Brown --- drivers/platform/x86/eeepc-laptop.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 7aaf587..353a898 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -748,6 +748,8 @@ static int eeepc_hotk_add(struct acpi_device *device) wlan_fail: if (ehotk->eeepc_wlan_rfkill) rfkill_free(ehotk->eeepc_wlan_rfkill); + eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P6"); + eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P7"); ehotk_fail: kfree(ehotk); ehotk = NULL; -- 1.6.0.6