Skip to contentSkip to conversation

rtc: 88pm860x: remove useless range check

PATCH New Alexandre Belloni 1 participant 1 message Apr 15, 2020 Real time clock (RTC)

lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

PATCH 1/1 rtc: 88pm860x: remove useless range check

Because the core is now checking the RTC range, it is unnecessary to check it again in .set_time/

---
 drivers/rtc/rtc-88pm860x.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/rtc/rtc-88pm860x.c +0 -6
index cc9b14ef90f1..c90457d001e9 100644
@@ -106,12 +106,6 @@ static int pm860x_rtc_set_time(struct device *dev, struct rtc_time *tm)
 	unsigned char buf[4];
 	unsigned long ticks, base, data;
 
-	if (tm->tm_year > 206) {
-		dev_dbg(info->dev, "Set time %d out of range. "
-			"Please set time between 1970 to 2106.\n",
-			1900 + tm->tm_year);
-		return -EINVAL;
-	}
 	ticks = rtc_tm_to_time64(tm);
 
 	/* load 32-bit read-only counter */
Signature · 1 line
2.25.2