Skip to contentSkip to conversation

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

PATCH New Alexandre Belloni 1 participant 1 message May 16, 2018 Real time clock (RTC)

lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

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

Avoid reporting an error when RTC_NVMEM is not selected.

---
 include/linux/rtc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/rtc.h +1 -1
index 4c007f69082f..6268208760e9 100644
@@ -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
Signature · 1 line
2.17.0