From patchwork Tue Jan 5 22:03:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Woithe X-Patchwork-Id: 71175 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o05M4lfu031906 for ; Tue, 5 Jan 2010 22:04:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754885Ab0AEWEq (ORCPT ); Tue, 5 Jan 2010 17:04:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754902Ab0AEWEq (ORCPT ); Tue, 5 Jan 2010 17:04:46 -0500 Received: from adelphi.physics.adelaide.edu.au ([129.127.102.1]:55534 "EHLO adelphi.physics.adelaide.edu.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885Ab0AEWEp (ORCPT ); Tue, 5 Jan 2010 17:04:45 -0500 Received: from turbo.physics.adelaide.edu.au (IDENT:0@turbo [129.127.102.108]) by adelphi.physics.adelaide.edu.au (8.13.7/8.13.7/UofA-Physics-1.0) with ESMTP id o05M3sG7020624; Wed, 6 Jan 2010 08:33:54 +1030 Received: from turbo.physics.adelaide.edu.au (IDENT:7157@localhost [127.0.0.1]) by turbo.physics.adelaide.edu.au (8.13.4/8.13.4) with ESMTP id o05M3snw023914; Wed, 6 Jan 2010 08:33:54 +1030 Received: (from jwoithe@localhost) by turbo.physics.adelaide.edu.au (8.13.4/8.13.4/Submit) id o05M3rdL023913; Wed, 6 Jan 2010 08:33:53 +1030 From: Jonathan Woithe Message-Id: <201001052203.o05M3rdL023913@turbo.physics.adelaide.edu.au> Subject: Re: [PATCH] fujitsu-laptop: driver [un]registration fixes To: dmitry.torokhov@gmail.com (Dmitry Torokhov) Date: Wed, 6 Jan 2010 08:33:53 +1030 (CST) Cc: lenb@kernel.org, bzolnier@gmail.com (Bartlomiej Zolnierkiewicz), jwoithe@physics.adelaide.edu.au (Jonathan Woithe), linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20100105191439.GB2854@core.coreip.homeip.net> from "Dmitry Torokhov" at Jan 05, 2010 11:14:39 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Index: b/drivers/platform/x86/fujitsu-laptop.c =================================================================== --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -724,6 +724,7 @@ static int acpi_fujitsu_add(struct acpi_ err_unregister_input_dev: input_unregister_device(input); + input = NULL; err_free_input_dev: input_free_device(input); err_stop: @@ -737,8 +738,6 @@ static int acpi_fujitsu_remove(struct ac input_unregister_device(input); - input_free_device(input); - fujitsu->acpi_handle = NULL; return 0; @@ -929,6 +928,7 @@ static int acpi_fujitsu_hotkey_add(struc err_unregister_input_dev: input_unregister_device(input); + input = NULL; err_free_input_dev: input_free_device(input); err_free_fifo: @@ -952,8 +952,6 @@ static int acpi_fujitsu_hotkey_remove(st input_unregister_device(input); - input_free_device(input); - kfifo_free(&fujitsu_hotkey->fifo); fujitsu_hotkey->acpi_handle = NULL;