eeepc-laptop: unregister_rfkill_notifier on failure
authorCorentin Chary <corentincj@iksaif.net>
Mon, 27 Apr 2009 07:23:43 +0000 (09:23 +0200)
committerLen Brown <len.brown@intel.com>
Thu, 14 May 2009 15:28:27 +0000 (11:28 -0400)
If there is a failure during eeepc_hotk_add() we need
to remove the acpi_notify_handler.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/eeepc-laptop.c

index 7aaf5879f666ef6e218b63273c7b6363e9027cc3..353a898c3693facba59683b1f792150e3538d9cf 100644 (file)
@@ -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;