public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/watchdog: Initialize 'result'
@ 2010-07-05  8:00 Kulikov Vasiliy
  2010-07-06 13:23 ` Don Zickus
  2010-07-07  8:03 ` [tip:perf/nmi] " tip-bot for Kulikov Vasiliy
  0 siblings, 2 replies; 3+ messages in thread
From: Kulikov Vasiliy @ 2010-07-05  8:00 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Frederic Weisbecker, Don Zickus, Ingo Molnar, linux-kernel

Variable on the stack is not initialized to zero, do it explicitly.

This patch silences a compiler warning:
kernel/watchdog.c:463: warning: ‘result’ may be used uninitialized in this function

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 kernel/watchdog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 91b0b26..613bc1f 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -460,7 +460,7 @@ static void watchdog_disable(int cpu)
 static void watchdog_enable_all_cpus(void)
 {
 	int cpu;
-	int result;
+	int result = 0;
 
 	for_each_online_cpu(cpu)
 		result += watchdog_enable(cpu);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-07  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05  8:00 [PATCH] kernel/watchdog: Initialize 'result' Kulikov Vasiliy
2010-07-06 13:23 ` Don Zickus
2010-07-07  8:03 ` [tip:perf/nmi] " tip-bot for Kulikov Vasiliy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox