diff options
author | Guenter Roeck <linux@roeck-us.net> | 2016-08-10 05:35:58 (GMT) |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2016-09-23 06:40:55 (GMT) |
commit | c97344f73fdc35b27c7315c5e7c5decd4ce10467 (patch) | |
tree | 4eab86e2fb4499e99dfc741e75127c6b0c6b1a6d /sound/pci | |
parent | 2e91838bf7ffdedabdb29e091207d6531d04ef4f (diff) | |
download | linux-c97344f73fdc35b27c7315c5e7c5decd4ce10467.tar.xz |
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 <dianders@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'sound/pci')
0 files changed, 0 insertions, 0 deletions