summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorAles Novak <alnovak@suse.cz>2014-06-06 21:35:39 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 23:08:06 (GMT)
commitee1d90146815fdc8d653c558b327fff2acba041d (patch)
treeed7ce64394d3adcca0974b359b8a2166c360fb9d /drivers/extcon
parent3364d113c8209feee425b0f8a770b51e6132c43f (diff)
downloadlinux-ee1d90146815fdc8d653c558b327fff2acba041d.tar.xz
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 'drivers/extcon')
0 files changed, 0 insertions, 0 deletions