aboutsummaryrefslogtreecommitdiff
path: root/tools/scripts
diff options
context:
space:
mode:
authorAles Novak <alnovak@suse.cz>2014-06-06 14:35:39 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:35:15 +0200
commita14c26a206fb3e4c814707c22bf37c15d722193d (patch)
tree76d6721122765d76eb19bf6c7d8bbda98ae09304 /tools/scripts
parentb8993897f77bf1d0904d3b4a8db2b56543074d62 (diff)
drivers/rtc/interface.c: fix infinite loop in initializing the alarm
In __rtc_read_alarm(), if the alarm time retrieved by rtc_read_alarm_internal() from the device contains invalid values (e.g. month=2,mday=31) and the year not set (=-1), the initialization will loop infinitely because the year-fixing loop expects the time being invalid due to leap year. Fix reduces the loop to the leap years and adds final validity check. Signed-off-by: Ales Novak <alnovak@suse.cz> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Reported-by: Jiri Bohac <jbohac@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/scripts')
0 files changed, 0 insertions, 0 deletions