From: Roel Kluin Date: Tue, 3 Mar 2009 14:10:05 +0000 (+0100) Subject: [WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed X-Git-Tag: MMI-PSA29.97-13-9~29363^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26952669f01646c3e7d0832c99b310b199fe2b20;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton --- 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 */