From patchwork Mon Sep 14 10:43:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 47286 X-Patchwork-Delegate: lenb@kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8EAqgTV004798 for ; Mon, 14 Sep 2009 10:52:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755158AbZINKv3 (ORCPT ); Mon, 14 Sep 2009 06:51:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755138AbZINKv2 (ORCPT ); Mon, 14 Sep 2009 06:51:28 -0400 Received: from iksaif.net ([88.191.73.63]:44080 "EHLO iksaif.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbZINKvY (ORCPT ); Mon, 14 Sep 2009 06:51:24 -0400 Received: from localhost.localdomain (cxr69-11-88-180-139-205.fbx.proxad.net [88.180.139.205]) (Authenticated sender: corentincj@iksaif.net) by iksaif.net (Postfix) with ESMTPA id 4E983C90018; Mon, 14 Sep 2009 12:44:47 +0200 (CEST) From: Corentin Chary To: linux-acpi@vger.kernel.org Cc: linux-kernel , Julia Lawall , Alan Jenkins , Johannes Berg , Corentin Chary , Henrique de Moraes Holschuh Subject: [PATCH 2/3] thinkpad_acpi: fix rfkill memory leak on unload Date: Mon, 14 Sep 2009 12:43:52 +0200 Message-Id: <1252925033-29696-3-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1252925033-29696-2-git-send-email-corentincj@iksaif.net> References: <1252925033-29696-1-git-send-email-corentincj@iksaif.net> <1252925033-29696-2-git-send-email-corentincj@iksaif.net> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org rfkill_unregister() should always be followed by rfkill_destroy() Cc: Henrique de Moraes Holschuh Signed-off-by: Corentin Chary Acked-by: Henrique de Moraes Holschuh --- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index e856008..21c9715 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); }