lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Jan 2015 02:31:54 +0000
From:	Xunlei Pang <pang.xunlei@...aro.org>
To:	linux-kernel@...r.kernel.org
Cc:	rtc-linux@...glegroups.com, Thomas Gleixner <tglx@...utronix.de>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	John Stultz <john.stultz@...aro.org>,
	Arnd Bergmann <arnd.bergmann@...aro.org>,
	Xunlei Pang <pang.xunlei@...aro.org>
Subject: [PATCH 4/5] rtc: Remove redundant rtc_valid_tm() from rtc_hctosys()

rtc_read_time() has already judged valid tm by rtc_valid_tm(),
so just remove it.

Reviewed-by: John Stultz <john.stultz@...aro.org>
Reviewed-by: Arnd Bergmann <arnd.bergmann@...aro.org>
Signed-off-by: Xunlei Pang <pang.xunlei@...aro.org>
---
 drivers/rtc/hctosys.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c
index 2153b52..6c719f2 100644
--- a/drivers/rtc/hctosys.c
+++ b/drivers/rtc/hctosys.c
@@ -45,13 +45,6 @@ static int __init rtc_hctosys(void)
 
 	}
 
-	err = rtc_valid_tm(&tm);
-	if (err) {
-		dev_err(rtc->dev.parent,
-			"hctosys: invalid date/time\n");
-		goto err_invalid;
-	}
-
 	tv64.tv_sec = rtc_tm_to_time64(&tm);
 
 	err = do_settimeofday64(&tv64);
@@ -63,7 +56,6 @@ static int __init rtc_hctosys(void)
 		tm.tm_hour, tm.tm_min, tm.tm_sec,
 		(long long) tv64.tv_sec);
 
-err_invalid:
 err_read:
 	rtc_class_close(rtc);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ