[PATCH] cmd: date: Handle -ENOSYS return from dm_rtc_reset()

Simon Glass sjg at chromium.org
Sun Jul 12 20:29:47 CEST 2026


On 2026-07-11T13:38:37, Marek Vasut <marex at nabladev.com> wrote:
> cmd: date: Handle -ENOSYS return from dm_rtc_reset()
>
> In case dm_rtc_reset() returns -ENOSYS, it means the .reset callback
> in RTC driver is not implemented, likely because the callback is not
> needed. Handle the -ENOSYS return code as success and proceed, else
> the 'date reset' invocation incorrectly prints a bogus warning:
> "## Failed to set date after RTC reset".
>
> Signed-off-by: Marek Vasut <marex at nabladev.com>
>
> cmd/date.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list