2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00

rtc: nvmem: don't return an error when not enabled

Avoid reporting an error when RTC_NVMEM is not selected.

Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
Alexandre Belloni 2018-05-16 21:08:42 +02:00
parent 5aa6a62d11
commit c59b3715ac

View File

@ -285,7 +285,7 @@ void rtc_nvmem_unregister(struct rtc_device *rtc);
static inline int rtc_nvmem_register(struct rtc_device *rtc,
struct nvmem_config *nvmem_config)
{
return -ENODEV;
return 0;
}
static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {}
#endif