summaryrefslogtreecommitdiff
path: root/drivers/watchdog/gef_wdt.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-03-03 17:10:05 +0300
committerWim Van Sebroeck <wim@iguana.be>2009-03-05 17:02:53 +0300
commit26952669f01646c3e7d0832c99b310b199fe2b20 (patch)
treee34390eed4512a74208c4c9588661861b0d54727 /drivers/watchdog/gef_wdt.c
parentb02c387892fc6b3cc59c78ab2f79413d55f50190 (diff)
downloadlinux-26952669f01646c3e7d0832c99b310b199fe2b20.tar.xz
[WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed
fsl_get_sys_freq() may return -1 when 'soc' isn't found, but in gef_wdt_probe() 'freq' is unsigned, so the test doesn't catch that. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/watchdog/gef_wdt.c')
-rw-r--r--drivers/watchdog/gef_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c
index f0c2b7a1a175..734d9806a872 100644
--- a/drivers/watchdog/gef_wdt.c
+++ b/drivers/watchdog/gef_wdt.c
@@ -269,7 +269,7 @@ static int __devinit gef_wdt_probe(struct of_device *dev,
bus_clk = 133; /* in MHz */
freq = fsl_get_sys_freq();
- if (freq > 0)
+ if (freq != -1)
bus_clk = freq;
/* Map devices registers into memory */