diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-30 16:18:34 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-05-23 11:53:05 -0400 |
commit | d2bc4cece13967e3e654a872a8f081ae4bf75911 (patch) | |
tree | b1398356388d9583aab92de921bc20e096b67a2b /drivers/rtc/rtc-st-lpc.c | |
parent | b3a50169762b14102a296a410d785f9ec1132ae1 (diff) |
rtc: st-lpc: remove unnecessary check
The RTC core already ensures the alarm is set to a time in the future, it
is not necessary to check again in the driver.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-st-lpc.c')
-rw-r--r-- | drivers/rtc/rtc-st-lpc.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index bee75ca7ff79..ce2dae6e2a24 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c | |||
@@ -166,10 +166,6 @@ static int st_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *t) | |||
166 | now_secs = rtc_tm_to_time64(&now); | 166 | now_secs = rtc_tm_to_time64(&now); |
167 | alarm_secs = rtc_tm_to_time64(&t->time); | 167 | alarm_secs = rtc_tm_to_time64(&t->time); |
168 | 168 | ||
169 | /* Invalid alarm time */ | ||
170 | if (now_secs > alarm_secs) | ||
171 | return -EINVAL; | ||
172 | |||
173 | memcpy(&rtc->alarm, t, sizeof(struct rtc_wkalrm)); | 169 | memcpy(&rtc->alarm, t, sizeof(struct rtc_wkalrm)); |
174 | 170 | ||
175 | /* Now many secs to fire */ | 171 | /* Now many secs to fire */ |