Skip to content

Commit d1d84a9

Browse files
committed
[clock_time] fix the rt_clock_hrtimer_control result issue
1 parent d5d4531 commit d1d84a9

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

components/drivers/clock_time/clock_hrtimer.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,7 @@ rt_err_t rt_clock_hrtimer_control(rt_clock_hrtimer_t timer, int cmd, void *arg)
349349
*(unsigned long *)arg = timer->timeout_cnt;
350350
break;
351351
case RT_TIMER_CTRL_GET_FUNC:
352-
if (arg == RT_NULL)
353-
{
354-
result = -RT_EEMPTY;
355-
}
356-
else
352+
if (arg != RT_NULL)
357353
{
358354
*(void **)arg = (void *)timer->timeout_func;
359355
}

0 commit comments

Comments
 (0)