diff options
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index b5cc5f82436d..ad66c6ecf365 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -125,6 +125,10 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
125 | { | 125 | { |
126 | int err; | 126 | int err; |
127 | 127 | ||
128 | err = rtc_valid_tm(&alarm->time); | ||
129 | if (err != 0) | ||
130 | return err; | ||
131 | |||
128 | err = mutex_lock_interruptible(&rtc->ops_lock); | 132 | err = mutex_lock_interruptible(&rtc->ops_lock); |
129 | if (err) | 133 | if (err) |
130 | return -EBUSY; | 134 | return -EBUSY; |