From patchwork Tue Jan 5 16:46:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 71098 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 o05J1hGL002599 for ; Tue, 5 Jan 2010 19:02:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754836Ab0AETAu (ORCPT ); Tue, 5 Jan 2010 14:00:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754791Ab0AETAt (ORCPT ); Tue, 5 Jan 2010 14:00:49 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:59982 "EHLO mail-fx0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754732Ab0AETAr (ORCPT ); Tue, 5 Jan 2010 14:00:47 -0500 Received: by fxm25 with SMTP id 25so10086797fxm.21 for ; Tue, 05 Jan 2010 11:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:message-id :content-type:content-transfer-encoding; bh=pOUogYb+hW35FwKuX4IoXDUw2f9VzJXvuRHTV6yIYl8=; b=c2F3RI7lv+o9Q22yYTgfzWXcy96NCkye/h5/IIPzN7mOo8FsYD2OZvPuTYD1pq+NUD CKkJSuFB1+1+iXcuV/7zHAsZR2O+NDnXHMHZzQGbzRmCMKeFcxwj1E+gUMUMjV0MvE95 P8GpVz5aoRi+FOgJ6v7ZqD6o5mpV+Apd9swZU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:message-id:content-type:content-transfer-encoding; b=xOlNBjYfY3KC70CSZGSC8BA3WK8nmXW8ng1kKF2CP1lsLpsSylEkFwJA7eO1lx0skZ L5T2KaEfoiLBC+dMO5jp3we7KS81A5yX/BoP19Y9pTD1D214oXugCGtWecrRuoThDcg4 EXlkua5sKG06Ns9AAOt4Fc1a2+TASRF7Q7kgo= Received: by 10.216.87.133 with SMTP id y5mr1665160wee.139.1262718045237; Tue, 05 Jan 2010 11:00:45 -0800 (PST) Received: from szaki.localnet (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id x6sm52150683gvf.22.2010.01.05.11.00.41 (version=SSLv3 cipher=RC4-MD5); Tue, 05 Jan 2010 11:00:42 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: Dmitry Torokhov Subject: Re: [PATCH] fujitsu-laptop: driver [un]registration fixes Date: Tue, 5 Jan 2010 17:46:46 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31.8-0.1-desktop; KDE/4.3.1; x86_64; ; ) Cc: Jonathan Woithe , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org References: <200912212232.nBLMWe5r016214@turbo.physics.adelaide.edu.au> <200912211446.32380.dmitry.torokhov@gmail.com> In-Reply-To: <200912211446.32380.dmitry.torokhov@gmail.com> MIME-Version: 1.0 Message-Id: <201001051746.46942.bzolnier@gmail.com> 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;