time: clocksource: Remove unnecessary ‘0’ values from count

Message ID 20230817003358.3118-1-zeming@nfschina.com
State New
Headers
Series time: clocksource: Remove unnecessary ‘0’ values from count |

Commit Message

Li zeming Aug. 17, 2023, 12:33 a.m. UTC
  count is assigned first, so it does not need to initialize the
assignment.

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

Patch

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 961c8a79b87a..40eb83d9db28 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -1312,7 +1312,7 @@  static ssize_t current_clocksource_show(struct device *dev,
 					struct device_attribute *attr,
 					char *buf)
 {
-	ssize_t count = 0;
+	ssize_t count;
 
 	mutex_lock(&clocksource_mutex);
 	count = snprintf(buf, PAGE_SIZE, "%s\n", curr_clocksource->name);