[PATCH 2/7] hwclock command: forward return value of rtc_set_time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rtc_set_time can fail, forward the error to the user.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 commands/hwclock.c | 3 +--
 1 file changed, 1 insertion(+), 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);
-- 
2.6.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux