summaryrefslogtreecommitdiffstats
path: root/commands/hwclock.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-12-11 12:05:40 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-01-07 08:46:09 +0100
commit720868011b8ddeb46346de1c82c059689264f8bb (patch)
tree3c50a557de356d22c872232903663be3d73c4c9b /commands/hwclock.c
parent6eb5d78419299d01f500140dd9400a68725e142b (diff)
downloadbarebox-720868011b8ddeb46346de1c82c059689264f8bb.tar.gz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/hwclock.c')
-rw-r--r--commands/hwclock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/hwclock.c b/commands/hwclock.c
index 49569a9..3f89cce 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);