From 926ffe745162c7d794ec69593dee09730a767539 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Tue, 26 Jul 2016 14:34:30 +0100 Subject: hwclock: fix rtc atexit registration Commit 27f9db17bd57b85947445c03e2cd9dda36ca377f missed a minus sign from comparison. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola --- sys-utils/hwclock-rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/hwclock-rtc.c') diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c index fa5e07b11..92f04435b 100644 --- a/sys-utils/hwclock-rtc.c +++ b/sys-utils/hwclock-rtc.c @@ -138,7 +138,7 @@ static int open_rtc(const struct hwclock_control *ctl) if (rtc_dev_fd < 0) rtc_dev_name = *fls; /* default for error messages */ } - if (rtc_dev_fd != 1) + if (rtc_dev_fd != -1) atexit(close_rtc); return rtc_dev_fd; } -- cgit v1.2.3-55-g7522