diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-09-30 09:19:57 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-10-02 05:59:55 +0200 |
commit | f245581eb865c1ed62fb6b8a382ab7bf6b0f6d38 (patch) | |
tree | e7e502c07b94862bcb697fa82aa2277ed60dc9cc /scripts | |
parent | d52d80666a54b8fa5ae1d52506b9638c512f130e (diff) | |
download | barebox-f245581eb865c1ed62fb6b8a382ab7bf6b0f6d38.tar.gz barebox-f245581eb865c1ed62fb6b8a382ab7bf6b0f6d38.tar.xz |
watchdog: fix division-by-zero when clock rate == 0
Instead of storing the clk into the driver's device-specific private
data, just store the rate and make sure it's != 0 on probe.
This aligns us with what Linux does for the STM32 IWDG and DW WDT.
Reported-by: clang-analyzer-10
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions