summaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog/src/watchdog-simple.c
diff options
context:
space:
mode:
authorJeff Garzik2006-10-10 09:40:44 +0200
committerWim Van Sebroeck2006-10-11 23:12:31 +0200
commit80060362aaefec507ac2d7a7bd156716d7a7ca91 (patch)
treea8c97880324f12aeeeded9cec6d3908ac95cc2d9 /Documentation/watchdog/src/watchdog-simple.c
parent[WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2) (diff)
downloadkernel-qcow2-linux-80060362aaefec507ac2d7a7bd156716d7a7ca91.tar.gz
kernel-qcow2-linux-80060362aaefec507ac2d7a7bd156716d7a7ca91.tar.xz
kernel-qcow2-linux-80060362aaefec507ac2d7a7bd156716d7a7ca91.zip
[WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
gcc emits the following warning: drivers/char/watchdog/iTCO_wdt.c: In function ‘iTCO_wdt_ioctl’: drivers/char/watchdog/iTCO_wdt.c:429: warning: ‘time_left’ may be used uninitialized in this function This indicates a condition near enough to a bug, to want to fix. iTCO_wdt_get_timeleft() stores a value in 'time_left' iff iTCO_version==(1 or 2). This driver only supports versions 1 or 2, so this is ok. However, since (a) the return value of iTCO_wdt_get_timeleft() is handled anyway, (b) it fixes the warning, and (c) it future-proofs the driver, we go ahead and add the obvious return value. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'Documentation/watchdog/src/watchdog-simple.c')
0 files changed, 0 insertions, 0 deletions