summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-tx4939.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-03 22:54:49 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-03 22:54:49 +0100
commit72d381974403018562ca7fa0fbc34d07202e7e1c (patch)
treea150044e00a86669db6e4e0542207ba6ecd65fe8 /drivers/rtc/rtc-tx4939.c
parent3199fc3d7417282f60387086d26c60d3b32bc4dc (diff)
rtc: tx4939: remove useless test
The tested condition will never happen as the core always passes a fully set struct tm (using rtc_ktime_to_tm) to the .set_alarm callback. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-tx4939.c')
-rw-r--r--drivers/rtc/rtc-tx4939.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c
index 61c110b2045f..8497fceea27f 100644
--- a/drivers/rtc/rtc-tx4939.c
+++ b/drivers/rtc/rtc-tx4939.c
@@ -123,13 +123,6 @@ static int tx4939_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
unsigned long sec;
unsigned char buf[6];
- if (alrm->time.tm_sec < 0 ||
- alrm->time.tm_min < 0 ||
- alrm->time.tm_hour < 0 ||
- alrm->time.tm_mday < 0 ||
- alrm->time.tm_mon < 0 ||
- alrm->time.tm_year < 0)
- return -EINVAL;
rtc_tm_to_time(&alrm->time, &sec);
buf[0] = 0;
buf[1] = 0;