diff mbox

[1/3] hp-wmi: fix rfkill memory leak on unload

Message ID 1252925033-29696-2-git-send-email-corentincj@iksaif.net (mailing list archive)
State Accepted
Delegated to: Len Brown
Headers show

Commit Message

Corentin Chary Sept. 14, 2009, 10:43 a.m. UTC
rfkill_unregister() should always be followed by rfkill_destroy()
In this case, rfkill_destroy was called two times on wifi_rfkill and
never on bluetooth_rfkill.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
 drivers/platform/x86/hp-wmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Matthew Garrett Sept. 14, 2009, 10:59 a.m. UTC | #1
On Mon, Sep 14, 2009 at 12:43:51PM +0200, Corentin Chary wrote:
> rfkill_unregister() should always be followed by rfkill_destroy()
> In this case, rfkill_destroy was called two times on wifi_rfkill and
> never on bluetooth_rfkill.
> 
> Signed-off-by: Corentin Chary <corentincj@iksaif.net>

Acked-by: Matthew Garrett <mjg@redhat.com>
Len Brown Sept. 19, 2009, 5:13 a.m. UTC | #2
applied

thanks,
Len Brown, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index a2ad53e..a750192 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -502,7 +502,7 @@  static int __exit hp_wmi_bios_remove(struct platform_device *device)
 	}
 	if (bluetooth_rfkill) {
 		rfkill_unregister(bluetooth_rfkill);
-		rfkill_destroy(wifi_rfkill);
+		rfkill_destroy(bluetooth_rfkill);
 	}
 	if (wwan_rfkill) {
 		rfkill_unregister(wwan_rfkill);