linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 8475/13571] sound/core/pcm_native.c:4106:5-11: inconsistent IS_ERR and PTR_ERR on line 4107.
Date: Thu, 14 Mar 2024 20:32:08 +0800	[thread overview]
Message-ID: <202403142014.H8ciGzs8-lkp@intel.com> (raw)

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

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


                 reply	other threads:[~2024-03-14 12:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202403142014.H8ciGzs8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).