diff options
| author | 2012-01-31 15:13:14 +0100 | |
|---|---|---|
| committer | 2012-01-31 15:13:14 +0100 | |
| commit | ea51e5040e24eefe44d70bc654a237ca1f0225b0 (patch) | |
| tree | df2e5922dcdfafae62a10d8cd97f98121064fc23 /drivers/rtc/interface.c | |
| parent | ALSA: HDA: Remove quirk for Toshiba Qosmio G50 (diff) | |
| parent | Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into fix/asoc (diff) | |
| download | wireguard-linux-ea51e5040e24eefe44d70bc654a237ca1f0225b0.tar.xz wireguard-linux-ea51e5040e24eefe44d70bc654a237ca1f0225b0.zip | |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to '')
| -rw-r--r-- | drivers/rtc/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 8e286259a007..8a1c031391d6 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -228,11 +228,11 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) alarm->time.tm_hour = now.tm_hour; /* For simplicity, only support date rollover for now */ - if (alarm->time.tm_mday == -1) { + if (alarm->time.tm_mday < 1 || alarm->time.tm_mday > 31) { alarm->time.tm_mday = now.tm_mday; missing = day; } - if (alarm->time.tm_mon == -1) { + if ((unsigned)alarm->time.tm_mon >= 12) { alarm->time.tm_mon = now.tm_mon; if (missing == none) missing = month; |
