Don't log an error if RTC_NVMEM isn't enabled (rhbz 1568276)

This commit is contained in:
Jeremy Cline 2018-06-19 09:25:51 -04:00
commit 0426af398e
No known key found for this signature in database
GPG key ID: 9223308FA9B246DB
2 changed files with 35 additions and 0 deletions

View file

@ -640,6 +640,10 @@ Patch507: platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch
# http://lists.infradead.org/pipermail/ath10k/2018-June/011582.html
Patch508: ath10k-Update-the-phymode-along-with-bandwidth-change.patch
# rhbz 1568276
# In 4.18
Patch509: rtc-nvmem-don-t-return-an-error-when-not-enabled.patch
# END OF PATCH DEFINITIONS
%endif
@ -1891,6 +1895,7 @@ fi
%changelog
* Tue Jun 19 2018 Jeremy Cline <jeremy@jcline.org>
- Re-apply the XPS 13 9370 backlight, ath10k bandwidth, and kexec patches
- Don't log an error if RTC_NVMEM isn't enabled (rhbz 1568276)
* Mon Jun 18 2018 Justin M. Forbes <jforbes@fedoraproject.org> - 4.17.2-200
- Linux v4.17.2 Rebase

View file

@ -0,0 +1,30 @@
From c59b3715ac16544f8f68ab7af03f108e339b36aa Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Wed, 16 May 2018 21:08:42 +0200
Subject: [PATCH] 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>
Signed-off-by: Jeremy Cline <jcline@redhat.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.1