lib/alloc_tag.c:142 alloc_tag_init() warn: passing zero to 'PTR_ERR'
kernel test robot
build botBCC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Suren Baghdasaryan <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Linux Memory Management List <[email protected]>
CC: Kent Overstreet <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 8568bb2ccc278f344e6ac44af6ed010a90aa88dc commit: 9e2dcefa791e9d14006b360fba3455510fd3325d [2720/3921] lib: add allocation tagging support for memory allocation profiling
:::::: branch date: 2 hours ago
:::::: commit date: 3 days ago
config: microblaze-randconfig-r081-20240405 (https://download.01.org/0day-ci/archive/20240405/[email protected]/config)
compiler: microblaze-linux-gcc (GCC) 13.2.0
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 <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
smatch warnings:lib/alloc_tag.c:142 alloc_tag_init() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +142 lib/alloc_tag.c
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 131
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 132 static int __init alloc_tag_init(void)
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 133 {
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 134 const struct codetag_type_desc desc = {
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 135 .section = "alloc_tags",
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 136 .tag_size = sizeof(struct alloc_tag),
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 137 .module_unload = alloc_tag_module_unload,
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 138 };
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 139
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 140 alloc_tag_cttype = codetag_register_type(&desc);
9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 141 if (IS_ERR_OR_NULL(alloc_tag_cttype))9e2dcefa791e9d Suren Baghdasaryan 2024-03-21 @142 return PTR_ERR(alloc_tag_cttype);
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki