0 day kernel build service
 help / color / mirror / Atom feed
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: Tue, 17 Mar 2026 09:00:23 +0800	[thread overview]
Message-ID: <202603170803.OkJuT0LU-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:   2d1373e4246da3b58e1df058374ed6b101804e07
commit: f653ff7af96951faa69c68665d44bed80702544f tests/liveupdate: add in-kernel liveupdate test
date:   5 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 5 weeks ago
config: x86_64-randconfig-161-20260317 (https://download.01.org/0day-ci/archive/20260317/202603170803.OkJuT0LU-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
smatch: v0.5.0-9004-gb810ac53

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603170803.OkJuT0LU-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

f653ff7af96951f Pasha Tatashin 2025-12-18  111  
f653ff7af96951f Pasha Tatashin 2025-12-18  112  void liveupdate_test_register(struct liveupdate_file_handler *fh)
f653ff7af96951f Pasha Tatashin 2025-12-18  113  {
f653ff7af96951f Pasha Tatashin 2025-12-18  114  	int err, i;
f653ff7af96951f Pasha Tatashin 2025-12-18  115  
f653ff7af96951f Pasha Tatashin 2025-12-18  116  	liveupdate_test_init();
f653ff7af96951f Pasha Tatashin 2025-12-18  117  
f653ff7af96951f Pasha Tatashin 2025-12-18  118  	for (i = 0; i < TEST_NFLBS; i++) {
f653ff7af96951f Pasha Tatashin 2025-12-18  119  		struct liveupdate_flb *flb = &test_flbs[i];
f653ff7af96951f Pasha Tatashin 2025-12-18  120  
f653ff7af96951f Pasha Tatashin 2025-12-18  121  		err = liveupdate_register_flb(fh, flb);
f653ff7af96951f Pasha Tatashin 2025-12-18  122  		if (err) {
f653ff7af96951f Pasha Tatashin 2025-12-18  123  			pr_err("Failed to register %s %pe\n",
f653ff7af96951f Pasha Tatashin 2025-12-18  124  			       flb->compatible, ERR_PTR(err));
f653ff7af96951f Pasha Tatashin 2025-12-18  125  		}
f653ff7af96951f Pasha Tatashin 2025-12-18  126  	}
f653ff7af96951f Pasha Tatashin 2025-12-18  127  
f653ff7af96951f Pasha Tatashin 2025-12-18  128  	err = liveupdate_register_flb(fh, &test_flbs[0]);
f653ff7af96951f Pasha Tatashin 2025-12-18  129  	if (!err || err != -EEXIST) {
f653ff7af96951f Pasha Tatashin 2025-12-18 @130  		pr_err("Failed: %s should be already registered, but got err: %pe\n",
f653ff7af96951f Pasha Tatashin 2025-12-18  131  		       test_flbs[0].compatible, ERR_PTR(err));
f653ff7af96951f Pasha Tatashin 2025-12-18  132  	}
f653ff7af96951f Pasha Tatashin 2025-12-18  133  
f653ff7af96951f Pasha Tatashin 2025-12-18  134  	pr_info("Registered %d FLBs with file handler: [%s]\n",
f653ff7af96951f Pasha Tatashin 2025-12-18  135  		TEST_NFLBS, fh->compatible);
f653ff7af96951f Pasha Tatashin 2025-12-18  136  }
f653ff7af96951f Pasha Tatashin 2025-12-18  137  

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

             reply	other threads:[~2026-03-17  1:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17  1:00 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-02 23:18 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=202603170803.OkJuT0LU-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