提交 5939eaf4 编写于 作者: W Wei Yongjun 提交者: Jarkko Sakkinen

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: 00194826 ("tpm_tis: Clean up the force=1 module parameter")
Cc: stable@vger.kernel.org
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
上级 52176603
...@@ -432,7 +432,7 @@ static int __init init_tis(void) ...@@ -432,7 +432,7 @@ static int __init init_tis(void)
acpi_bus_unregister_driver(&tis_acpi_driver); acpi_bus_unregister_driver(&tis_acpi_driver);
err_acpi: err_acpi:
#endif #endif
platform_device_unregister(force_pdev); platform_driver_unregister(&tis_drv);
err_platform: err_platform:
if (force_pdev) if (force_pdev)
platform_device_unregister(force_pdev); platform_device_unregister(force_pdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册