summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-16 21:08:42 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-16 21:08:42 +0200
commitc59b3715ac16544f8f68ab7af03f108e339b36aa (patch)
tree3bb1b8aced09a60a7d9eb025900132955cbcb1ff /include
parent5aa6a62d115b7ffe269b2a00144aa325d90a2169 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rtc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 4c007f69082f..6268208760e9 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