From: kernel test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: sound/core/control.c:1409:5-11: inconsistent IS_ERR and PTR_ERR on line 1410.
Date: Fri, 15 Mar 2024 07:25:39 +0800 [thread overview]
Message-ID: <202403150720.IvePtxNs-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/torvalds/linux.git master
head: fe46a7dd189e25604716c03576d05ac8a5209743
commit: 1052d988226948493eb9730b3424308972eca5f4 ALSA: control: Use automatic cleanup of kfree()
date: 3 weeks ago
config: x86_64-randconfig-103-20240314 (https://download.01.org/0day-ci/archive/20240315/202403150720.IvePtxNs-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/202403150720.IvePtxNs-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> sound/core/control.c:1409:5-11: inconsistent IS_ERR and PTR_ERR on line 1410.
vim +1409 sound/core/control.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1400
82e9bae6fd253a Takashi Iwai 2005-11-17 1401 static int snd_ctl_elem_write_user(struct snd_ctl_file *file,
82e9bae6fd253a Takashi Iwai 2005-11-17 1402 struct snd_ctl_elem_value __user *_control)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1403 {
1052d988226948 Takashi Iwai 2024-02-22 1404 struct snd_ctl_elem_value *control __free(kfree) = NULL;
646494007b48e8 Giuliano Pochini 2006-03-13 1405 struct snd_card *card;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1406 int result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1407
ef44a1ec6eeef1 Li Zefan 2009-04-10 1408 control = memdup_user(_control, sizeof(*control));
ef44a1ec6eeef1 Li Zefan 2009-04-10 @1409 if (IS_ERR(control))
1052d988226948 Takashi Iwai 2024-02-22 @1410 return PTR_ERR(no_free_ptr(control));
ef44a1ec6eeef1 Li Zefan 2009-04-10 1411
646494007b48e8 Giuliano Pochini 2006-03-13 1412 card = file->card;
646494007b48e8 Giuliano Pochini 2006-03-13 1413 result = snd_ctl_elem_write(card, file, control);
7d8e8292013ab7 Takashi Iwai 2017-08-30 1414 if (result < 0)
1052d988226948 Takashi Iwai 2024-02-22 1415 return result;
7d8e8292013ab7 Takashi Iwai 2017-08-30 1416
^1da177e4c3f41 Linus Torvalds 2005-04-16 1417 if (copy_to_user(_control, control, sizeof(*control)))
1052d988226948 Takashi Iwai 2024-02-22 1418 return -EFAULT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1419 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1420 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1421
:::::: The code at line 1409 was first introduced by commit
:::::: ef44a1ec6eeef189998f84e7230e1d3535b01074 ALSA: sound/core: use memdup_user()
:::::: TO: Li Zefan <lizf@cn.fujitsu.com>
:::::: CC: Takashi Iwai <tiwai@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-14 23:25 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=202403150720.IvePtxNs-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.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