提交 26952669 编写于 作者: R Roel Kluin 提交者: Wim Van Sebroeck

[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: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
上级 b02c3878
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册