Skip to content

Commit

Permalink
[WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Wim Van Sebroeck committed Mar 5, 2009
1 parent b02c387 commit 2695266
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/gef_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2695266

Please sign in to comment.