drivers/rtc: Skip clock_synchronize if settime return positive value
so driver implementer could call clock_synchronize by self Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
e6ebcb62b1
commit
67bff06a24
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user