Skip to contentSkip to conversation

sound/core/compress_offload.c:1071:5-11: inconsistent IS_ERR and PTR_ERR on line 1072.

DISCUSSION kernel test robot 1 participant 1 message Dec 29, 2024

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   059dd502b263d8a4e2a84809cf1068d6a3905e6f
commit: 04177158cf98a79744937893b100020d77e6f9ac ALSA: compress_offload: introduce accel operation mode
date:   9 weeks ago
config: i386-randconfig-054-20241229 (https://download.01.org/0day-ci/archive/20241229/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

cocci warnings: (new ones prefixed by >>)

>> sound/core/compress_offload.c:1071:5-11: inconsistent IS_ERR and PTR_ERR on line 1072.

sound/core/compress_offload.c:1132:5-11: inconsistent IS_ERR and PTR_ERR on line 1133. sound/core/compress_offload.c:1223:5-11: inconsistent IS_ERR and PTR_ERR on line 1224.

vim +1071 sound/core/compress_offload.c

1062
1063 static int snd_compr_task_create(struct snd_compr_stream *stream, unsigned long arg)
1064 {
1065 struct snd_compr_task *task __free(kfree) = NULL;
1066 int retval;
1067
1068 if (stream->runtime->state != SNDRV_PCM_STATE_SETUP)
1069 return -EPERM;
1070 task = memdup_user((void __user *)arg, sizeof(*task));

> 1071		if (IS_ERR(task))
> 1072			return PTR_ERR(no_free_ptr(task));

1073 retval = snd_compr_task_new(stream, task);
1074 if (retval >= 0)
1075 if (copy_to_user((void __user *)arg, task, sizeof(*task)))
1076 retval = -EFAULT;
1077 return retval;
1078 }
1079

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