summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorWei Yongjun2017-02-07 16:51:47 +0100
committerJarkko Sakkinen2017-02-14 18:24:33 +0100
commit5939eaf4f9d432586dd2cdeea778506471e8088e (patch)
treea1806d4ab454ea4fe79b1e711e9ab34b5beae8db /drivers/char/tpm
parentKEYS: Use memzero_explicit() for secret data (diff)
downloadkernel-qcow2-linux-5939eaf4f9d432586dd2cdeea778506471e8088e.tar.gz
kernel-qcow2-linux-5939eaf4f9d432586dd2cdeea778506471e8088e.tar.xz
kernel-qcow2-linux-5939eaf4f9d432586dd2cdeea778506471e8088e.zip
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/tpm')
-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);