[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 коммит произвёл Wim Van Sebroeck
Родитель b02c387892
Коммит 26952669f0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

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