Skip to content

Commit bd32005

Browse files
iksaiflenb
authored andcommitted
eeepc-laptop: unregister_rfkill_notifier on failure
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>
1 parent 309f5fb commit bd32005

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/platform/x86/eeepc-laptop.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static int eeepc_hotk_add(struct acpi_device *device)
748748
wlan_fail:
749749
if (ehotk->eeepc_wlan_rfkill)
750750
rfkill_free(ehotk->eeepc_wlan_rfkill);
751+
eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P6");
752+
eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P7");
751753
ehotk_fail:
752754
kfree(ehotk);
753755
ehotk = NULL;

0 commit comments

Comments
 (0)