commit | 84b84bcf4f718b7b9f5296d4068025fea801a0e1 | [log] [tgz] |
---|---|---|
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | Thu Mar 03 09:24:12 2016 +0100 |
committer | Wim Van Sebroeck <wim@iguana.be> | Wed Mar 16 21:09:16 2016 +0100 |
tree | e6f039e2e02679d26a63c4757245cf8aa4281c8f | |
parent | ccc8208d0855a5b02a4fc49c141b6f1dbf282304 [diff] |
watchdog: tangox_wdt: test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate, so we should check the result before using it as a divisor. For this, refactor the code to use a central error path. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>