From: Corentin Chary Date: Mon, 14 Sep 2009 10:43:52 +0000 (+0200) Subject: thinkpad_acpi: fix rfkill memory leak on unload X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f0dadb4bd259c3b832e19702f552947244edfb9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git thinkpad_acpi: fix rfkill memory leak on unload rfkill_unregister() should always be followed by rfkill_destroy() Signed-off-by: Corentin Chary Acked-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 955adf67e8f0..f78d27503925 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -1278,6 +1278,7 @@ static void tpacpi_destroy_rfkill(const enum tpacpi_rfk_id id) tp_rfk = tpacpi_rfkill_switches[id]; if (tp_rfk) { rfkill_unregister(tp_rfk->rfkill); + rfkill_destroy(tp_rfk->rfkill); tpacpi_rfkill_switches[id] = NULL; kfree(tp_rfk); }