Skip to content
Commit db621f17 authored by David Brownell's avatar David Brownell Committed by Linus Torvalds
Browse files

[PATCH] RTC class: error checks



The rtc_is_valid_tm() routine needs to treat some of the fields it checks as
unsigned, to prevent wrongly accepting invalid rtc_time structs; this is the
same approach used elsewhere in the RTC code for such tests.

Conversely, rtc_proc_show() is missing one invalid-day-of-month test that
rtc_is_valid_tm() makes: there is no day zero.

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 818a8674
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment