* [PATCH -next] tpm_tis: fix the error handling of init_tis()
@ 2017-02-07 15:51 Wei Yongjun
2017-02-07 17:05 ` Jason Gunthorpe
2017-02-08 11:36 ` Jarkko Sakkinen
0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2017-02-07 15:51 UTC (permalink / raw)
To: Peter Huewe, Marcel Selhorst, Jarkko Sakkinen, Jason Gunthorpe
Cc: Wei Yongjun, tpmdd-devel, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
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>
---
drivers/char/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 7912dad..c7e1384 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] tpm_tis: fix the error handling of init_tis()
2017-02-07 15:51 [PATCH -next] tpm_tis: fix the error handling of init_tis() Wei Yongjun
@ 2017-02-07 17:05 ` Jason Gunthorpe
2017-02-08 11:36 ` Jarkko Sakkinen
1 sibling, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2017-02-07 17:05 UTC (permalink / raw)
To: Wei Yongjun
Cc: Peter Huewe, Marcel Selhorst, Jarkko Sakkinen, Wei Yongjun,
tpmdd-devel, linux-kernel
On Tue, Feb 07, 2017 at 03:51:47PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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>
> drivers/char/tpm/tpm_tis.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Yep. Thanks
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] tpm_tis: fix the error handling of init_tis()
2017-02-07 15:51 [PATCH -next] tpm_tis: fix the error handling of init_tis() Wei Yongjun
2017-02-07 17:05 ` Jason Gunthorpe
@ 2017-02-08 11:36 ` Jarkko Sakkinen
2017-02-08 11:38 ` Jarkko Sakkinen
1 sibling, 1 reply; 4+ messages in thread
From: Jarkko Sakkinen @ 2017-02-08 11:36 UTC (permalink / raw)
To: Wei Yongjun
Cc: Peter Huewe, Marcel Selhorst, Jason Gunthorpe, Wei Yongjun,
tpmdd-devel, linux-kernel
On Tue, Feb 07, 2017 at 03:51:47PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
> ---
> drivers/char/tpm/tpm_tis.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> index 7912dad..c7e1384 100644
> --- a/drivers/char/tpm/tpm_tis.c
> +++ b/drivers/char/tpm/tpm_tis.c
> @@ -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);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] tpm_tis: fix the error handling of init_tis()
2017-02-08 11:36 ` Jarkko Sakkinen
@ 2017-02-08 11:38 ` Jarkko Sakkinen
0 siblings, 0 replies; 4+ messages in thread
From: Jarkko Sakkinen @ 2017-02-08 11:38 UTC (permalink / raw)
To: Wei Yongjun
Cc: Peter Huewe, Marcel Selhorst, Jason Gunthorpe, Wei Yongjun,
tpmdd-devel, linux-kernel
On Wed, Feb 08, 2017 at 01:36:37PM +0200, Jarkko Sakkinen wrote:
> On Tue, Feb 07, 2017 at 03:51:47PM +0000, Wei Yongjun wrote:
> > From: Wei Yongjun <weiyongjun1@huawei.com>
> >
> > 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: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
I applied this and added cc to stable.
/Jarkko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-08 11:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 15:51 [PATCH -next] tpm_tis: fix the error handling of init_tis() Wei Yongjun
2017-02-07 17:05 ` Jason Gunthorpe
2017-02-08 11:36 ` Jarkko Sakkinen
2017-02-08 11:38 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).