aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/hctosys.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/hctosys.c')
-rw-r--r--drivers/rtc/hctosys.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c
index ff2092a0d38c..a74d0d890600 100644
--- a/drivers/rtc/hctosys.c
+++ b/drivers/rtc/hctosys.c
@@ -1,13 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * RTC subsystem, initialize system time on startup 3 * RTC subsystem, initialize system time on startup
3 * 4 *
4 * Copyright (C) 2005 Tower Technologies 5 * Copyright (C) 2005 Tower Technologies
5 * Author: Alessandro Zummo <a.zummo@towertech.it> 6 * Author: Alessandro Zummo <a.zummo@towertech.it>
6 * 7 */
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11 8
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 9#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13 10
@@ -33,7 +30,7 @@ static int __init rtc_hctosys(void)
33 }; 30 };
34 struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); 31 struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
35 32
36 if (rtc == NULL) { 33 if (!rtc) {
37 pr_info("unable to open rtc device (%s)\n", 34 pr_info("unable to open rtc device (%s)\n",
38 CONFIG_RTC_HCTOSYS_DEVICE); 35 CONFIG_RTC_HCTOSYS_DEVICE);
39 goto err_open; 36 goto err_open;
@@ -44,7 +41,6 @@ static int __init rtc_hctosys(void)
44 dev_err(rtc->dev.parent, 41 dev_err(rtc->dev.parent,
45 "hctosys: unable to read the hardware clock\n"); 42 "hctosys: unable to read the hardware clock\n");
46 goto err_read; 43 goto err_read;
47
48 } 44 }
49 45
50 tv64.tv_sec = rtc_tm_to_time64(&tm); 46 tv64.tv_sec = rtc_tm_to_time64(&tm);