public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] tpm_tis: fix the error handling of init_tis()
@ 2017-02-07 15:51 Wei Yongjun
  2017-02-07 17:05 ` Jason Gunthorpe
  2017-02-08 11:36 ` Jarkko Sakkinen
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2017-02-07 15:51 UTC (permalink / raw)
  To: Peter Huewe, Marcel Selhorst, Jarkko Sakkinen, Jason Gunthorpe
  Cc: Wei Yongjun, tpmdd-devel, linux-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

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 <weiyongjun1@huawei.com>
---
 drivers/char/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-08 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 15:51 [PATCH -next] tpm_tis: fix the error handling of init_tis() Wei Yongjun
2017-02-07 17:05 ` Jason Gunthorpe
2017-02-08 11:36 ` Jarkko Sakkinen
2017-02-08 11:38   ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox