LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] rtc: nvmem: don't return an error when not enabled
@ 2018-05-16 19:10 Alexandre Belloni
0 siblings, 0 replies; only message in thread
From: Alexandre Belloni @ 2018-05-16 19:10 UTC (permalink / raw)
To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.17.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-16 19:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 19:10 [PATCH] rtc: nvmem: don't return an error when not enabled Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).