From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: lib/tests/liveupdate.c:130 liveupdate_test_register() warn: passing zero to 'ERR_PTR'
Date: Fri, 03 Jul 2026 07:18:36 +0800 [thread overview]
Message-ID: <202607030701.UujNlooD-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Pasha Tatashin <pasha.tatashin@soleen.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
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/202607030701.UujNlooD-lkp@intel.com/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 <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202607030701.UujNlooD-lkp@intel.com/
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
next reply other threads:[~2026-07-02 23:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 23:18 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-17 1:00 lib/tests/liveupdate.c:130 liveupdate_test_register() warn: passing zero to 'ERR_PTR' kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202607030701.UujNlooD-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox