From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a8RXn-0001LE-Jj for barebox@lists.infradead.org; Mon, 14 Dec 2015 11:43:56 +0000 From: Sascha Hauer Date: Mon, 14 Dec 2015 12:43:26 +0100 Message-Id: <1450093411-13885-2-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1450093411-13885-1-git-send-email-s.hauer@pengutronix.de> References: <1450093411-13885-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/7] hwclock command: forward return value of rtc_set_time To: Barebox List 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(-) 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@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox