From 720868011b8ddeb46346de1c82c059689264f8bb Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 11 Dec 2015 12:05:40 +0100 Subject: hwclock command: forward return value of rtc_set_time rtc_set_time can fail, forward the error to the user. Signed-off-by: Sascha Hauer --- commands/hwclock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'commands/hwclock.c') diff --git a/commands/hwclock.c b/commands/hwclock.c index 49569a99c2..3f89cceee3 100644 --- a/commands/hwclock.c +++ b/commands/hwclock.c @@ -124,8 +124,7 @@ static int do_hwclock(int argc, char *argv[]) return PTR_ERR(r); if (set) { - rtc_set_time(r, &stm); - return 0; + return rtc_set_time(r, &stm); } rtc_read_time(r, &tm); -- cgit v1.2.3