]> Git Repo - linux.git/commitdiff
kernel/watchdog: Initialize 'result'
authorKulikov Vasiliy <[email protected]>
Mon, 5 Jul 2010 08:00:54 +0000 (12:00 +0400)
committerIngo Molnar <[email protected]>
Wed, 7 Jul 2010 06:46:42 +0000 (08:46 +0200)
Variable on the stack is not initialized to zero, do it
explicitly.

This bug was found by a compiler warning:

 kernel/watchdog.c:463: warning: 'result' may be used uninitialized in this function

Signed-off-by: Kulikov Vasiliy <[email protected]>
Acked-by: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Steven Rostedt <[email protected]>
LKML-Reference: <1278316854[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
kernel/watchdog.c

index 91b0b26adc6736f6c0528b93ca5ea420424811db..613bc1f046108ec52b8f7372fe2e7e66aa8fe4c7 100644 (file)
@@ -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);
This page took 0.051259 seconds and 4 git commands to generate.