From patchwork Wed Aug 19 09:38:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Jenkins X-Patchwork-Id: 42553 X-Patchwork-Delegate: corentincj@iksaif.net 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 n7J9eCau000530 for ; Wed, 19 Aug 2009 09:40:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751524AbZHSJjC (ORCPT ); Wed, 19 Aug 2009 05:39:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751310AbZHSJjC (ORCPT ); Wed, 19 Aug 2009 05:39:02 -0400 Received: from ey-out-2122.google.com ([74.125.78.26]:25819 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbZHSJjA (ORCPT ); Wed, 19 Aug 2009 05:39:00 -0400 Received: by ey-out-2122.google.com with SMTP id 22so974031eye.37 for ; Wed, 19 Aug 2009 02:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=PDeE5hH5tMP7g1nxETlb4VBvdQiQfFNMDHBNfxVjqeM=; b=vo2PU9dKUVSXlN5sEqttRvRGODpQmBuJnB6FEJzZl9UrFm3qbBxEKsaA1LCfDGT7K7 nfOb+tbDu1m09/Bvci6AT1Ed6EwtONJBomMLfex1BCQnD131v3bWKiIgD9cwNGBfwQJA FsjBjz+oGUd6dh9bSpLkawMfGOQ5tjQfkR25U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=SXO5/gjvKexU8TfkxxI5R9v9XCwKnd8cSbm/xa6L4XDYWs++UrshAXw2/x+lG50ViJ 59+hYmW3U1Aifq2aK46VkWehnXOBcejXzRi9m44ljh9bRlTQsGXbCowPZyg0zSkhI2ac 9D9/CyoUB9m/sRBU8kUM/+g2chceGN6/qrwG4= Received: by 10.211.194.4 with SMTP id w4mr9264530ebp.46.1250674739824; Wed, 19 Aug 2009 02:38:59 -0700 (PDT) Received: from ?192.168.0.5? ([86.53.68.233]) by mx.google.com with ESMTPS id 10sm2907450eyd.4.2009.08.19.02.38.58 (version=SSLv3 cipher=RC4-MD5); Wed, 19 Aug 2009 02:38:59 -0700 (PDT) Message-ID: <4A8BC831.8050708@tuffmail.co.uk> Date: Wed, 19 Aug 2009 10:38:57 +0100 From: Alan Jenkins User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Corentin Chary CC: linux acpi , linux-kernel Subject: [PATCH 1/2] eeepc-laptop: fix rfkill memory leak on unload 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() Signed-off-by: Alan Jenkins --- drivers/platform/x86/eeepc-laptop.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) -- 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 --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 1c94860..36d613b 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -981,6 +981,7 @@ static void eeepc_rfkill_exit(void) eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P7"); if (ehotk->wlan_rfkill) { rfkill_unregister(ehotk->wlan_rfkill); + rfkill_destroy(ehotk->wlan_rfkill); ehotk->wlan_rfkill = NULL; } /* @@ -991,10 +992,14 @@ static void eeepc_rfkill_exit(void) if (ehotk->hotplug_slot) pci_hp_deregister(ehotk->hotplug_slot); - if (ehotk->bluetooth_rfkill) + if (ehotk->bluetooth_rfkill) { rfkill_unregister(ehotk->bluetooth_rfkill); - if (ehotk->wwan3g_rfkill) + rfkill_destroy(ehotk->bluetooth_rfkill); + } + if (ehotk->wwan3g_rfkill) { rfkill_unregister(ehotk->wwan3g_rfkill); + rfkill_destroy(ehotk->wwan3g_rfkill); + } }