mirror of https://gitee.com/openkylin/linux.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 <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:
parent
b02c387892
commit
26952669f0
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue