All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 8727/15099] drivers/firmware/imx/se_ctrl.c:476:2-7: WARNING: invalid free of devm_ allocated data
@ 2026-06-24  5:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-24  5:09 UTC (permalink / raw)
  To: Pankaj Gupta; +Cc: oe-kbuild-all, Frank Li

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   4e5dfb7c84012007c3c7061126491bbc92d71bf1
commit: 2768fdfd55852f0973ddb0866eef14321df2fa47 [8727/15099] firmware: drivers: imx: adds miscdev
config: powerpc64-randconfig-r052-20260624 (https://download.01.org/0day-ci/archive/20260624/202606241320.9gDd2s75-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project a9b492db3d50683e446cd1a5c9ffaf4e92cb77a7)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606241320.9gDd2s75-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/imx/se_ctrl.c:476:2-7: WARNING: invalid free of devm_ allocated data
   drivers/firmware/imx/se_ctrl.c:487:2-7: WARNING: invalid free of devm_ allocated data

vim +476 drivers/firmware/imx/se_ctrl.c

   460	
   461	static int init_device_context(struct se_if_priv *priv, int ch_id,
   462				       struct se_if_device_ctx **new_dev_ctx)
   463	{
   464		struct se_if_device_ctx *dev_ctx;
   465		int ret = 0;
   466	
   467		dev_ctx = kzalloc_obj(*dev_ctx, GFP_KERNEL);
   468	
   469		if (!dev_ctx)
   470			return -ENOMEM;
   471	
   472		dev_ctx->devname = kasprintf(GFP_KERNEL, "%s0_ch%d",
   473					     get_se_if_name(priv->if_defs->se_if_type),
   474					     ch_id);
   475		if (!dev_ctx->devname) {
 > 476			kfree(dev_ctx);
   477			return -ENOMEM;
   478		}
   479	
   480		mutex_init(&dev_ctx->fops_lock);
   481		dev_ctx->priv = priv;
   482		*new_dev_ctx = dev_ctx;
   483	
   484		ret = init_se_shared_mem(dev_ctx);
   485		if (ret < 0) {
   486			kfree(dev_ctx->devname);
   487			kfree(dev_ctx);
   488			*new_dev_ctx = NULL;
   489		}
   490	
   491		list_add_tail(&dev_ctx->link, &priv->dev_ctx_list);
   492		priv->active_devctx_count++;
   493	
   494		return ret;
   495	}
   496	

--
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:[~2026-06-24  5:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24  5:09 [linux-next:master 8727/15099] drivers/firmware/imx/se_ctrl.c:476:2-7: WARNING: invalid free of devm_ allocated data 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.