[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>
This commit is contained in:
Roel Kluin 2009-03-03 15:10:05 +01:00 committed by Wim Van Sebroeck
parent b02c387892
commit 26952669f0
1 changed files with 1 additions and 1 deletions

View File

@ -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 */