浏览代码

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>
Alexandre Belloni 7 年之前
父节点
当前提交
c59b3715ac
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/rtc.h

+ 1 - 1
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