Commit 5f0dadb4 authored by Corentin Chary's avatar Corentin Chary Committed by Len Brown

thinkpad_acpi: fix rfkill memory leak on unload

rfkill_unregister() should always be followed by rfkill_destroy()
Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent de4c8cc7
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment