Revert "sched/wdog/wd_cancel: Return 0 (OK) when cancelling an inactive wdog"

This reverts commit c28c14ad26.
This commit is contained in:
Jukka Laitinen 2025-05-15 16:08:40 +03:00 committed by Xiang Xiao
parent f57a5a6802
commit 466525891d

View file

@ -70,7 +70,7 @@ int wd_cancel(FAR struct wdog_s *wdog)
if (wdog == NULL || !WDOG_ISACTIVE(wdog))
{
spin_unlock_irqrestore(&g_wdspinlock, flags);
return wdog == NULL ? -EINVAL : 0;
return -EINVAL;
}
sched_note_wdog(NOTE_WDOG_CANCEL, (FAR void *)wdog->func,