From patchwork Tue Feb 7 15:51:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 725215 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vHpkK37xzz9s7l for ; Wed, 8 Feb 2017 02:52:09 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cb83n-0003kY-KX; Tue, 07 Feb 2017 15:52:03 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cb83m-0003kQ-Te for tpmdd-devel@lists.sourceforge.net; Tue, 07 Feb 2017 15:52:02 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.83.68 as permitted sender) client-ip=74.125.83.68; envelope-from=weiyj.lk@gmail.com; helo=mail-pg0-f68.google.com; Received: from mail-pg0-f68.google.com ([74.125.83.68]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1cb83k-00059E-JW for tpmdd-devel@lists.sourceforge.net; Tue, 07 Feb 2017 15:52:02 +0000 Received: by mail-pg0-f68.google.com with SMTP id 194so12452115pgd.0 for ; Tue, 07 Feb 2017 07:52:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KYj7qiqdJ/mHIyGSlZFW6bPtIJps4LUP+NZZzuYLZ1o=; b=c8XwkMUj3vFNkftzE3qatDGDuTRrPtzz1dNQ+sAf92hiOlSKxDzsxEc5fYoPA/8uA3 +9JCHz1Thbcj+njViWzqYS11U627+tEIs6tVp43ca/UKB1Ax/YP8MTYU4R6BwD44c3bw WujPBepyLZKj6tZ32eA4GLjf9c7fA0Hi9XTwl8bbDFq8oE9rTrhRYLJaMligbgfuXFoK BMEWu92LzydhgzEBzB35Th66Et+l3ddZosJct/JCjAPOa/YUAfRcGmO543sA5LHv/C9L DW7OxqbYWJ2ZlAAHu6Kqka+GFRGAl0JI865Kw6ZecQ4EyIh8zuYYeKZJa06u6EZ/NCf3 8TsA== X-Gm-Message-State: AIkVDXLVyAOMxbjLwUz7TcgWFlXVb978wRMMQ13hq5/yz7NwMQrYbM6j3BimVxXhuxyEOg== X-Received: by 10.98.223.195 with SMTP id d64mr20507946pfl.80.1486482714972; Tue, 07 Feb 2017 07:51:54 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id 75sm12479374pfp.80.2017.02.07.07.51.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 07:51:54 -0800 (PST) From: Wei Yongjun To: Peter Huewe , Marcel Selhorst , Jarkko Sakkinen , Jason Gunthorpe Date: Tue, 7 Feb 2017 15:51:47 +0000 Message-Id: <20170207155147.2581-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Spam-Score: 0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.83.68 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.83.68 listed in dnsbl.sorbs.net] 1.5 FSL_HELO_BARE_IP_2 FSL_HELO_BARE_IP_2 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1cb83k-00059E-JW Cc: tpmdd-devel@lists.sourceforge.net, Wei Yongjun , linux-kernel@vger.kernel.org Subject: [tpmdd-devel] [PATCH -next] tpm_tis: fix the error handling of init_tis() X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net From: Wei Yongjun Add the missing platform_driver_unregister() and remove the duplicate platform_device_unregister(force_pdev) in the error handling case. Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter") Signed-off-by: Wei Yongjun Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 7912dad..c7e1384 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -432,7 +432,7 @@ static int __init init_tis(void) acpi_bus_unregister_driver(&tis_acpi_driver); err_acpi: #endif - platform_device_unregister(force_pdev); + platform_driver_unregister(&tis_drv); err_platform: if (force_pdev) platform_device_unregister(force_pdev);