Hi Chunhui, kernel test robot noticed the following build errors: [auto build test ERROR on mcgrof/modules-next] [also build test ERROR on linus/master v6.11-rc5 next-20240830] [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/Chunhui-Li/module-abort-module-loading-when-sysfs-setup-suffer-errors/20240830-134417 base: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git modules-next patch link: https://lore.kernel.org/r/20240830054400.26622-1-chunhui.li%40mediatek.com patch subject: [PATCH] module: abort module loading when sysfs setup suffer errors config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20240901/202409010016.3XIFSmRA-lkp@xxxxxxxxx/config) compiler: or1k-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240901/202409010016.3XIFSmRA-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/202409010016.3XIFSmRA-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): kernel/module/sysfs.c: In function 'mod_sysfs_setup': >> kernel/module/sysfs.c:400:13: error: void value not ignored as it ought to be 400 | err = add_sect_attrs(mod, info); | ^ kernel/module/sysfs.c:404:13: error: void value not ignored as it ought to be 404 | err = add_notes_attrs(mod, info); | ^ vim +400 kernel/module/sysfs.c 370 371 int mod_sysfs_setup(struct module *mod, 372 const struct load_info *info, 373 struct kernel_param *kparam, 374 unsigned int num_params) 375 { 376 int err; 377 378 err = mod_sysfs_init(mod); 379 if (err) 380 goto out; 381 382 mod->holders_dir = kobject_create_and_add("holders", &mod->mkobj.kobj); 383 if (!mod->holders_dir) { 384 err = -ENOMEM; 385 goto out_unreg; 386 } 387 388 err = module_param_sysfs_setup(mod, kparam, num_params); 389 if (err) 390 goto out_unreg_holders; 391 392 err = module_add_modinfo_attrs(mod); 393 if (err) 394 goto out_unreg_param; 395 396 err = add_usage_links(mod); 397 if (err) 398 goto out_unreg_modinfo_attrs; 399 > 400 err = add_sect_attrs(mod, info); 401 if (err) 402 goto out_unreg_sect_attrs; 403 404 err = add_notes_attrs(mod, info); 405 if (err) 406 goto out_unreg_notes_attrs; 407 408 return 0; 409 410 out_unreg_notes_attrs: 411 remove_notes_attrs(mod); 412 out_unreg_sect_attrs: 413 remove_sect_attrs(mod); 414 out_unreg_modinfo_attrs: 415 module_remove_modinfo_attrs(mod, -1); 416 out_unreg_param: 417 module_param_sysfs_remove(mod); 418 out_unreg_holders: 419 kobject_put(mod->holders_dir); 420 out_unreg: 421 mod_kobject_put(mod); 422 out: 423 return err; 424 } 425 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki