* [PATCH -next] char/tpm: simplify the return expression of tpm_tis_synquacer_module_init()
@ 2020-12-10 13:55 Zheng Yongjun
2020-12-11 10:53 ` Jarkko Sakkinen
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-10 13:55 UTC (permalink / raw)
To: peterhuewe, jarkko, jgg, linux-integrity, linux-kernel; +Cc: Zheng Yongjun
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/char/tpm/tpm_tis_synquacer.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis_synquacer.c b/drivers/char/tpm/tpm_tis_synquacer.c
index e47bdd272704..3b4ae2f23f09 100644
--- a/drivers/char/tpm/tpm_tis_synquacer.c
+++ b/drivers/char/tpm/tpm_tis_synquacer.c
@@ -188,13 +188,8 @@ static struct platform_driver tis_synquacer_drv = {
static int __init tpm_tis_synquacer_module_init(void)
{
- int rc;
- rc = platform_driver_register(&tis_synquacer_drv);
- if (rc)
- return rc;
-
- return 0;
+ return platform_driver_register(&tis_synquacer_drv);
}
static void __exit tpm_tis_synquacer_module_exit(void)
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] char/tpm: simplify the return expression of tpm_tis_synquacer_module_init()
2020-12-10 13:55 [PATCH -next] char/tpm: simplify the return expression of tpm_tis_synquacer_module_init() Zheng Yongjun
@ 2020-12-11 10:53 ` Jarkko Sakkinen
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2020-12-11 10:53 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: peterhuewe, jgg, linux-integrity, linux-kernel
On Thu, Dec 10, 2020 at 09:55:15PM +0800, Zheng Yongjun wrote:
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
I don't see how this would be meaningful change as the existing
code is according to the coding style.
> ---
> drivers/char/tpm/tpm_tis_synquacer.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm_tis_synquacer.c b/drivers/char/tpm/tpm_tis_synquacer.c
> index e47bdd272704..3b4ae2f23f09 100644
> --- a/drivers/char/tpm/tpm_tis_synquacer.c
> +++ b/drivers/char/tpm/tpm_tis_synquacer.c
> @@ -188,13 +188,8 @@ static struct platform_driver tis_synquacer_drv = {
>
> static int __init tpm_tis_synquacer_module_init(void)
> {
> - int rc;
>
> - rc = platform_driver_register(&tis_synquacer_drv);
> - if (rc)
> - return rc;
> -
> - return 0;
> + return platform_driver_register(&tis_synquacer_drv);
> }
>
> static void __exit tpm_tis_synquacer_module_exit(void)
> --
> 2.22.0
>
>
/Jarkko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-11 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 13:55 [PATCH -next] char/tpm: simplify the return expression of tpm_tis_synquacer_module_init() Zheng Yongjun
2020-12-11 10:53 ` 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).