From: Wei Yongjun Date: Tue, 7 Feb 2017 15:51:47 +0000 (+0000) Subject: tpm_tis: fix the error handling of init_tis() X-Git-Tag: v4.10.2~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b54dc49d8c4f2b1ab5ea27cca47db3fb8fa51ddf;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 7912dadc39be5..c7e1384f1b080 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);