From: Jeff Garzik Date: Tue, 10 Oct 2006 07:40:44 +0000 (-0400) Subject: [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning X-Git-Tag: v2.6.19-rc3~1^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80060362aaefec507ac2d7a7bd156716d7a7ca91;p=pandora-kernel.git [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 Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton --- Reading git-diff-tree failed