Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5939eaf4 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jarkko Sakkinen
Browse files

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 52176603
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);