]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
rtc: nvmem: don't return an error when not enabled
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 16 May 2018 19:08:42 +0000 (21:08 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 16 May 2018 19:08:42 +0000 (21:08 +0200)
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>
include/linux/rtc.h

index 4c007f69082f477e8e6a03669e84d61d5f694e35..6268208760e9587acac1114a4ce071e4bbacb160 100644 (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