All of lore.kernel.org
 help / color / mirror / Atom feed
* [sj:damon/next 39/109] mm/damon/sysfs.c:920 damon_sysfs_sample_add_dirs() warn: missing error code 'err'
@ 2025-12-29 18:34 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-12-27 11:50 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: SeongJae Park <sj@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
head:   1d3e0ce41f6d1140a6ca73d505b536f2edc92e40
commit: 4cba4bd330b3be68e2624d824965554e1ba6a48c [39/109] mm/damon/sysfs: implement sample/filters/ directory
:::::: branch date: 16 hours ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20251227 (https://download.01.org/0day-ci/archive/20251227/202512271918.xuSlfGd4-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)

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/202512271918.xuSlfGd4-lkp@intel.com/

smatch warnings:
mm/damon/sysfs.c:920 damon_sysfs_sample_add_dirs() warn: missing error code 'err'

vim +/err +920 mm/damon/sysfs.c

399d9187753ad1 SeongJae Park 2025-12-02  900  
381d987c8a405a SeongJae Park 2025-12-02  901  static int damon_sysfs_sample_add_dirs(
381d987c8a405a SeongJae Park 2025-12-02  902  		struct damon_sysfs_sample *sample)
381d987c8a405a SeongJae Park 2025-12-02  903  {
381d987c8a405a SeongJae Park 2025-12-02  904  	struct damon_sysfs_primitives *primitives;
4cba4bd330b3be SeongJae Park 2025-12-02  905  	struct damon_sysfs_sample_filters *filters;
381d987c8a405a SeongJae Park 2025-12-02  906  	int err;
381d987c8a405a SeongJae Park 2025-12-02  907  
381d987c8a405a SeongJae Park 2025-12-02  908  	primitives = damon_sysfs_primitives_alloc(true, false);
381d987c8a405a SeongJae Park 2025-12-02  909  	if (!primitives)
381d987c8a405a SeongJae Park 2025-12-02  910  		return -ENOMEM;
381d987c8a405a SeongJae Park 2025-12-02  911  	err = kobject_init_and_add(&primitives->kobj,
381d987c8a405a SeongJae Park 2025-12-02  912  			&damon_sysfs_primitives_ktype, &sample->kobj,
381d987c8a405a SeongJae Park 2025-12-02  913  			"primitives");
381d987c8a405a SeongJae Park 2025-12-02  914  	if (err)
381d987c8a405a SeongJae Park 2025-12-02  915  		goto put_primitives_out;
381d987c8a405a SeongJae Park 2025-12-02  916  	sample->primitives = primitives;
381d987c8a405a SeongJae Park 2025-12-02  917  
4cba4bd330b3be SeongJae Park 2025-12-02  918  	filters = damon_sysfs_sample_filters_alloc();
4cba4bd330b3be SeongJae Park 2025-12-02  919  	if (!filters)
4cba4bd330b3be SeongJae Park 2025-12-02 @920  		goto put_primitives_out;
4cba4bd330b3be SeongJae Park 2025-12-02  921  	err = kobject_init_and_add(&filters->kobj,
4cba4bd330b3be SeongJae Park 2025-12-02  922  			&damon_sysfs_sample_filters_ktype, &sample->kobj,
4cba4bd330b3be SeongJae Park 2025-12-02  923  			"filters");
4cba4bd330b3be SeongJae Park 2025-12-02  924  	if (err)
4cba4bd330b3be SeongJae Park 2025-12-02  925  		goto put_filters_out;
4cba4bd330b3be SeongJae Park 2025-12-02  926  	sample->filters = filters;
4cba4bd330b3be SeongJae Park 2025-12-02  927  	return 0;
4cba4bd330b3be SeongJae Park 2025-12-02  928  put_filters_out:
4cba4bd330b3be SeongJae Park 2025-12-02  929  	kobject_put(&filters->kobj);
4cba4bd330b3be SeongJae Park 2025-12-02  930  	sample->filters = NULL;
381d987c8a405a SeongJae Park 2025-12-02  931  put_primitives_out:
381d987c8a405a SeongJae Park 2025-12-02  932  	kobject_put(&primitives->kobj);
381d987c8a405a SeongJae Park 2025-12-02  933  	sample->primitives = NULL;
381d987c8a405a SeongJae Park 2025-12-02  934  	return err;
381d987c8a405a SeongJae Park 2025-12-02  935  }
381d987c8a405a SeongJae Park 2025-12-02  936  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-30  6:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-27 11:50 [sj:damon/next 39/109] mm/damon/sysfs.c:920 damon_sysfs_sample_add_dirs() warn: missing error code 'err' kernel test robot
2025-12-29 18:34 ` Dan Carpenter
2025-12-30  6:37 ` SeongJae Park

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.