Re: [PATCH] x86/rtc: fix failed fallback RTC device registration handling

From: kernel test robot

Date: Wed Apr 29 2026 - 18:42:17 EST


Hi Guangshuo,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/master]
[also build test ERROR on linus/master v7.1-rc1 next-20260429]
[cannot apply to tip/auto-latest tip/x86/core bp/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Guangshuo-Li/x86-rtc-fix-failed-fallback-RTC-device-registration-handling/20260416-130623
base: tip/master
patch link: https://lore.kernel.org/r/20260415193455.3869807-1-lgs201920130244%40gmail.com
patch subject: [PATCH] x86/rtc: fix failed fallback RTC device registration handling
config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20260430/202604300638.5ysk7jy1-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604300638.5ysk7jy1-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604300638.5ysk7jy1-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

arch/x86/kernel/rtc.c: In function 'add_rtc_cmos':
>> arch/x86/kernel/rtc.c:142:9: error: 'ret' undeclared (first use in this function); did you mean 'net'?
142 | ret = platform_device_register(&rtc_device);
| ^~~
| net
arch/x86/kernel/rtc.c:142:9: note: each undeclared identifier is reported only once for each function it appears in


vim +142 arch/x86/kernel/rtc.c

133
134 static __init int add_rtc_cmos(void)
135 {
136 if (cmos_rtc_platform_device_present)
137 return 0;
138
139 if (!x86_platform.legacy.rtc)
140 return -ENODEV;
141
> 142 ret = platform_device_register(&rtc_device);

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki