[linux-next:master 8475/13571] sound/core/pcm_native.c:4106:5-11: inconsistent IS_ERR and PTR_ERR on line 4107.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Takashi,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9bb9b28d0568991b1d63e66fe75afa5f97ad1156
commit: ae921398486419c6284d70bd8332eb7edbdb4f70 [8475/13571] ALSA: pcm: Use automatic cleanup of kfree()
config: x86_64-randconfig-103-20240314 (https://download.01.org/0day-ci/archive/20240314/202403142014.H8ciGzs8-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403142014.H8ciGzs8-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> sound/core/pcm_native.c:4106:5-11: inconsistent IS_ERR and PTR_ERR on line 4107.
   sound/core/pcm_native.c:864:5-11: inconsistent IS_ERR and PTR_ERR on line 865.
   sound/core/pcm_native.c:4077:5-11: inconsistent IS_ERR and PTR_ERR on line 4078.
   sound/core/pcm_native.c:573:5-11: inconsistent IS_ERR and PTR_ERR on line 574.
   sound/core/pcm_native.c:3287:5-11: inconsistent IS_ERR and PTR_ERR on line 3288.

vim +4106 sound/core/pcm_native.c

  4093	
  4094	static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
  4095					      struct snd_pcm_hw_params_old __user * _oparams)
  4096	{
  4097		struct snd_pcm_hw_params *params __free(kfree) = NULL;
  4098		struct snd_pcm_hw_params_old *oparams __free(kfree) = NULL;
  4099		int err;
  4100	
  4101		params = kmalloc(sizeof(*params), GFP_KERNEL);
  4102		if (!params)
  4103			return -ENOMEM;
  4104	
  4105		oparams = memdup_user(_oparams, sizeof(*oparams));
> 4106		if (IS_ERR(oparams))
> 4107			return PTR_ERR(no_free_ptr(oparams));
  4108	
  4109		snd_pcm_hw_convert_from_old_params(params, oparams);
  4110		err = snd_pcm_hw_params(substream, params);
  4111		if (err < 0)
  4112			return err;
  4113	
  4114		snd_pcm_hw_convert_to_old_params(oparams, params);
  4115		if (copy_to_user(_oparams, oparams, sizeof(*oparams)))
  4116			return -EFAULT;
  4117		return 0;
  4118	}
  4119	#endif /* CONFIG_SND_SUPPORT_OLD_API */
  4120	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux