You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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:
committed by
Wim Van Sebroeck
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 */
|
||||
|
||||
Reference in New Issue
Block a user