{
#ifdef CONFIG_DM_RTC
efi_status_t ret = EFI_SUCCESS;
- int r;
struct rtc_time tm;
struct udevice *dev;
ret = EFI_INVALID_PARAMETER;
goto out;
}
-
- r = uclass_get_device(UCLASS_RTC, 0, &dev);
- if (!r)
- r = dm_rtc_get(dev, &tm);
- if (r) {
+ if (uclass_get_device(UCLASS_RTC, 0, &dev) ||
+ dm_rtc_get(dev, &tm)) {
+ ret = EFI_UNSUPPORTED;
+ goto out;
+ }
+ if (dm_rtc_get(dev, &tm)) {
ret = EFI_DEVICE_ERROR;
goto out;
}
return EFI_EXIT(ret);
#else
EFI_ENTRY("%p %p", time, capabilities);
- return EFI_EXIT(EFI_DEVICE_ERROR);
+ return EFI_EXIT(EFI_UNSUPPORTED);
#endif
}