summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-02-07 15:51:47 +0000
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2017-02-14 19:24:33 +0200
commit5939eaf4f9d432586dd2cdeea778506471e8088e (patch)
treea1806d4ab454ea4fe79b1e711e9ab34b5beae8db /drivers/char
parent52176603795c2ab7e9faf6bb94820da1b726aabd (diff)
downloadlinux-5939eaf4f9d432586dd2cdeea778506471e8088e.tar.bz2
tpm_tis: fix the error handling of init_tis()
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") Cc: stable@vger.kernel.org Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 7912dadc39be..c7e1384f1b08 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -432,7 +432,7 @@ err_pnp:
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);