lib/tests/liveupdate.c:130 liveupdate_test_register() warn: passing zero to 'ERR_PTR'
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <[email protected]> |
BCC: [email protected] CC: [email protected] CC: [email protected] TO: Pasha Tatashin <[email protected]> CC: Andrew Morton <[email protected]> CC: Linux Memory Management List <[email protected]> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 87320be9f0d24fce67631b7eef919f0b79c3e45c commit: f653ff7af96951faa69c68665d44bed80702544f tests/liveupdate: add in-kernel liveupdate test date: 5 months ago :::::: branch date: 7 hours ago :::::: commit date: 5 months ago config: x86_64-randconfig-161-20260703 (https://download.01.org/0day-ci/archive/20260703/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 smatch: v0.5.0-9185-gbcc58b9c 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 | Fixes: f653ff7af969 ("tests/liveupdate: add in-kernel liveupdate test") | Reported-by: kernel test robot <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ smatch warnings: lib/tests/liveupdate.c:130 liveupdate_test_register() warn: passing zero to 'ERR_PTR' vim +/ERR_PTR +130 lib/tests/liveupdate.c f653ff7af96951 Pasha Tatashin 2025-12-18 111 f653ff7af96951 Pasha Tatashin 2025-12-18 112 void liveupdate_test_register(struct liveupdate_file_handler *fh) f653ff7af96951 Pasha Tatashin 2025-12-18 113 { f653ff7af96951 Pasha Tatashin 2025-12-18 114 int err, i; f653ff7af96951 Pasha Tatashin 2025-12-18 115 f653ff7af96951 Pasha Tatashin 2025-12-18 116 liveupdate_test_init(); f653ff7af96951 Pasha Tatashin 2025-12-18 117 f653ff7af96951 Pasha Tatashin 2025-12-18 118 for (i = 0; i < TEST_NFLBS; i++) { f653ff7af96951 Pasha Tatashin 2025-12-18 119 struct liveupdate_flb *flb = &test_flbs[i]; f653ff7af96951 Pasha Tatashin 2025-12-18 120 f653ff7af96951 Pasha Tatashin 2025-12-18 121 err = liveupdate_register_flb(fh, flb); f653ff7af96951 Pasha Tatashin 2025-12-18 122 if (err) { f653ff7af96951 Pasha Tatashin 2025-12-18 123 pr_err("Failed to register %s %pe\n", f653ff7af96951 Pasha Tatashin 2025-12-18 124 flb->compatible, ERR_PTR(err)); f653ff7af96951 Pasha Tatashin 2025-12-18 125 } f653ff7af96951 Pasha Tatashin 2025-12-18 126 } f653ff7af96951 Pasha Tatashin 2025-12-18 127 f653ff7af96951 Pasha Tatashin 2025-12-18 128 err = liveupdate_register_flb(fh, &test_flbs[0]); f653ff7af96951 Pasha Tatashin 2025-12-18 129 if (!err || err != -EEXIST) { f653ff7af96951 Pasha Tatashin 2025-12-18 @130 pr_err("Failed: %s should be already registered, but got err: %pe\n", f653ff7af96951 Pasha Tatashin 2025-12-18 131 test_flbs[0].compatible, ERR_PTR(err)); f653ff7af96951 Pasha Tatashin 2025-12-18 132 } f653ff7af96951 Pasha Tatashin 2025-12-18 133 f653ff7af96951 Pasha Tatashin 2025-12-18 134 pr_info("Registered %d FLBs with file handler: [%s]\n", f653ff7af96951 Pasha Tatashin 2025-12-18 135 TEST_NFLBS, fh->compatible); f653ff7af96951 Pasha Tatashin 2025-12-18 136 } f653ff7af96951 Pasha Tatashin 2025-12-18 137 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki