From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbZINKvc (ORCPT ); Mon, 14 Sep 2009 06:51:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752796AbZINKv3 (ORCPT ); Mon, 14 Sep 2009 06:51:29 -0400 Received: from iksaif.net ([88.191.73.63]:44082 "EHLO iksaif.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbZINKvY (ORCPT ); Mon, 14 Sep 2009 06:51:24 -0400 From: Corentin Chary To: linux-acpi@vger.kernel.org Cc: linux-kernel , Julia Lawall , Alan Jenkins , Johannes Berg , Corentin Chary Subject: [PATCH 1/3] hp-wmi: fix rfkill memory leak on unload Date: Mon, 14 Sep 2009 12:43:51 +0200 Message-Id: <1252925033-29696-2-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1252925033-29696-1-git-send-email-corentincj@iksaif.net> References: <1252925033-29696-1-git-send-email-corentincj@iksaif.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/platform/x86/hp-wmi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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); -- 1.6.4.2