From: Alexandre Belloni Date: Wed, 16 May 2018 19:08:42 +0000 (+0200) Subject: rtc: nvmem: don't return an error when not enabled X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c59b3715ac16544f8f68ab7af03f108e339b36aa;p=linux.git 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 Signed-off-by: Alexandre Belloni --- diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 4c007f69082f4..6268208760e95 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -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