watchdog: handle timeout programming errors more safely
authorFranck Bui <fbui@suse.com>
Mon, 27 Sep 2021 08:51:28 +0000 (10:51 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 13 Oct 2021 06:58:36 +0000 (08:58 +0200)
commit0ffdfe7d6863e6d479323d90c222f2dcae2ff057
tree45ceaf4ff836d9ee8740ccb318e3f7a27582a32a
parentb3aa73e4de614c06c4a27e5635967a0392654fbc
watchdog: handle timeout programming errors more safely

If an error happened while the timeout value was being programmed, the error
was ignored and the watchdog module used the new timeout value whereas the
watchdog device was left with the previous one.

Now in cases of error, the device is now disabled and closed if it wasn't
opened already otherwise the previous timeout value is kept so the device is
still pinged at correct intervals.
src/shared/watchdog.c