aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-st-lpc.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-04-30 22:18:34 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-05-23 17:53:05 +0200
commitd2bc4cece13967e3e654a872a8f081ae4bf75911 (patch)
treeb1398356388d9583aab92de921bc20e096b67a2b /drivers/rtc/rtc-st-lpc.c
parentrtc: ds1307: properly handle oscillator failure flags (diff)
downloadlinux-dev-d2bc4cece13967e3e654a872a8f081ae4bf75911.tar.xz
linux-dev-d2bc4cece13967e3e654a872a8f081ae4bf75911.zip
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.c4
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)
now_secs = rtc_tm_to_time64(&now);
alarm_secs = rtc_tm_to_time64(&t->time);
- /* Invalid alarm time */
- if (now_secs > alarm_secs)
- return -EINVAL;
-
memcpy(&rtc->alarm, t, sizeof(struct rtc_wkalrm));
/* Now many secs to fire */