diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2016-03-03 11:24:12 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2016-03-16 23:09:16 +0300 |
commit | 84b84bcf4f718b7b9f5296d4068025fea801a0e1 (patch) | |
tree | e6f039e2e02679d26a63c4757245cf8aa4281c8f /drivers/watchdog/pnx4008_wdt.c | |
parent | ccc8208d0855a5b02a4fc49c141b6f1dbf282304 (diff) | |
download | linux-84b84bcf4f718b7b9f5296d4068025fea801a0e1.tar.xz |
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>
Diffstat (limited to 'drivers/watchdog/pnx4008_wdt.c')
0 files changed, 0 insertions, 0 deletions