]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 3 Mar 2009 14:10:05 +0000 (15:10 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 5 Mar 2009 14:02:53 +0000 (14:02 +0000)
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>
drivers/watchdog/gef_wdt.c

index f0c2b7a1a175b0d23bbaec7878f8da9e5d8b2768..734d9806a872bc300ad756ab7978192025a58f37 100644 (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 */