diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-02-07 15:51:47 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 05:41:43 (GMT) |
commit | 84c2697c9cd3c4ed05945d80fdfd4b7e906dd074 (patch) | |
tree | cbc1e5d8b508cb31931884fc1844a7f29a62af31 /drivers/char/tpm | |
parent | 2f714ba1282aa6f5f0158329a1b2d3858698618c (diff) | |
download | linux-84c2697c9cd3c4ed05945d80fdfd4b7e906dd074.tar.xz |
tpm_tis: fix the error handling of init_tis()
commit 5939eaf4f9d432586dd2cdeea778506471e8088e upstream.
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>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index eaf5730..8022bea 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -421,7 +421,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); |