All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android13-5.15 10/10] drivers/dma-buf/st-dma-fence-unwrap.c:75:39-45: ERROR: reference preceded by free on line 70
@ 2024-12-27 14:05 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-27 14:05 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com

tree:   https://android.googlesource.com/kernel/common android13-5.15
head:   f0b678d66a6fea50a07caa82f754461f550d500c
commit: 7aa4d35d52466ff170359781977cb644b595d2d1 [10/10] UPSTREAM: dma-buf: cleanup dma_fence_unwrap selftest v2
:::::: branch date: 19 hours ago
:::::: commit date: 19 hours ago
config: x86_64-randconfig-101-20241227 (https://download.01.org/0day-ci/archive/20241227/202412272143.B9jfMgsY-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.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 <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202412272143.B9jfMgsY-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/dma-buf/st-dma-fence-unwrap.c:75:39-45: ERROR: reference preceded by free on line 70

vim +75 drivers/dma-buf/st-dma-fence-unwrap.c

169630111a051b Christian König 2022-03-11  45  
169630111a051b Christian König 2022-03-11  46  static struct dma_fence *mock_array(unsigned int num_fences, ...)
169630111a051b Christian König 2022-03-11  47  {
169630111a051b Christian König 2022-03-11  48  	struct dma_fence_array *array;
169630111a051b Christian König 2022-03-11  49  	struct dma_fence **fences;
169630111a051b Christian König 2022-03-11  50  	va_list valist;
169630111a051b Christian König 2022-03-11  51  	int i;
169630111a051b Christian König 2022-03-11  52  
169630111a051b Christian König 2022-03-11  53  	fences = kcalloc(num_fences, sizeof(*fences), GFP_KERNEL);
169630111a051b Christian König 2022-03-11  54  	if (!fences)
7aa4d35d52466f Christian König 2022-05-04  55  		goto error_put;
169630111a051b Christian König 2022-03-11  56  
169630111a051b Christian König 2022-03-11  57  	va_start(valist, num_fences);
169630111a051b Christian König 2022-03-11  58  	for (i = 0; i < num_fences; ++i)
169630111a051b Christian König 2022-03-11  59  		fences[i] = va_arg(valist, typeof(*fences));
169630111a051b Christian König 2022-03-11  60  	va_end(valist);
169630111a051b Christian König 2022-03-11  61  
169630111a051b Christian König 2022-03-11  62  	array = dma_fence_array_create(num_fences, fences,
169630111a051b Christian König 2022-03-11  63  				       dma_fence_context_alloc(1),
169630111a051b Christian König 2022-03-11  64  				       1, false);
169630111a051b Christian König 2022-03-11  65  	if (!array)
7aa4d35d52466f Christian König 2022-05-04  66  		goto error_free;
169630111a051b Christian König 2022-03-11  67  	return &array->base;
169630111a051b Christian König 2022-03-11  68  
7aa4d35d52466f Christian König 2022-05-04  69  error_free:
169630111a051b Christian König 2022-03-11 @70  	kfree(fences);
7aa4d35d52466f Christian König 2022-05-04  71  
7aa4d35d52466f Christian König 2022-05-04  72  error_put:
7aa4d35d52466f Christian König 2022-05-04  73  	va_start(valist, num_fences);
7aa4d35d52466f Christian König 2022-05-04  74  	for (i = 0; i < num_fences; ++i)
7aa4d35d52466f Christian König 2022-05-04 @75  		dma_fence_put(va_arg(valist, typeof(*fences)));
7aa4d35d52466f Christian König 2022-05-04  76  	va_end(valist);
169630111a051b Christian König 2022-03-11  77  	return NULL;
169630111a051b Christian König 2022-03-11  78  }
169630111a051b Christian König 2022-03-11  79  

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-27 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27 14:05 [android-common:android13-5.15 10/10] drivers/dma-buf/st-dma-fence-unwrap.c:75:39-45: ERROR: reference preceded by free on line 70 kernel test robot

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.