time: clocksource-wdtest: Remove unnecessary initialization of variable 'ret'

Message ID 20230613193540.3177-1-zeming@nfschina.com
State New
Headers
Series time: clocksource-wdtest: Remove unnecessary initialization of variable 'ret' |

Commit Message

Li zeming June 13, 2023, 7:35 p.m. UTC
  ret is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/time/clocksource-wdtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Gleixner June 12, 2023, 7:40 a.m. UTC | #1
Li!

On Wed, Jun 14 2023 at 03:35, Li zeming wrote:

Can you please pick the proper prefixes and not create random ones.

https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject

> ret is assigned first, so it does not need to initialize the
> assignment.

This sentence does not make sense. You cannot initialize an
assignment. What you want to say is something like this.

'ret' is always assigned before being checked, so initializing the
variable is not required.

No?

Thanks,

        tglx
  

Patch

diff --git a/kernel/time/clocksource-wdtest.c b/kernel/time/clocksource-wdtest.c
index df922f49d171..bf89700aa9bf 100644
--- a/kernel/time/clocksource-wdtest.c
+++ b/kernel/time/clocksource-wdtest.c
@@ -181,7 +181,7 @@  static void clocksource_wdtest_cleanup(void)
 
 static int __init clocksource_wdtest_init(void)
 {
-	int ret = 0;
+	int ret;
 
 	wdtest_print_module_parms();