This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 67bff06a24ffb82bfa711519b914d3ba3a706098
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
AuthorDate: Sun Nov 19 23:36:27 2023 +0800

    drivers/rtc: Skip clock_synchronize if settime return positive value
    
    so driver implementer could call clock_synchronize by self
    
    Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com>
---
 drivers/timers/rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c
index 41c0fc7053..5fe50dec39 100644
--- a/drivers/timers/rtc.c
+++ b/drivers/timers/rtc.c
@@ -396,7 +396,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
         if (ops->settime)
           {
             ret = ops->settime(upper->lower, rtctime);
-            if (ret >= 0)
+            if (ret == 0)
               {
                 /* If the RTC time was set successfully, then update the
                  * current system time to match.

Reply via email to