aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorGuenter Roeck <[email protected]>2016-08-09 22:35:58 -0700
committerWim Van Sebroeck <[email protected]>2016-09-23 08:40:55 +0200
commitc97344f73fdc35b27c7315c5e7c5decd4ce10467 (patch)
tree4eab86e2fb4499e99dfc741e75127c6b0c6b1a6d /tools/perf/scripts/python/check-perf-trace.py
parent2e91838bf7ffdedabdb29e091207d6531d04ef4f (diff)
watchdog: dw_wdt: Read clock rate only once and validate it
Coverity reports: divide_by_zero: In expression readl(dw_wdt->regs + 8) / clk_get_rate(dw_wdt->clk), division by expression clk_get_rate(dw_wdt->clk) which may be zero has undefined behavior. The clock used for the watchdog timer won't change its rate, so read it only once during probe. Also validate it and abort the probe function with an error if it is 0. Cc: Douglas Anderson <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions