mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-23 21:11:51 -05:00
ALSA: compress_offload: Drop unneeded no_free_ptr()
The error path for memdup_user() no longer needs the tricky wrap with
no_free_ptr() and we can safely return the error pointer directly.
Fixes: 04177158cf ("ALSA: compress_offload: introduce accel operation mode")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412290846.cncnpGaw-lkp@intel.com/
Link: https://patch.msgid.link/20241229083917.14912-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1077,7 +1077,7 @@ static int snd_compr_task_create(struct snd_compr_stream *stream, unsigned long
|
||||
return -EPERM;
|
||||
task = memdup_user((void __user *)arg, sizeof(*task));
|
||||
if (IS_ERR(task))
|
||||
return PTR_ERR(no_free_ptr(task));
|
||||
return PTR_ERR(task);
|
||||
retval = snd_compr_task_new(stream, task);
|
||||
if (retval >= 0)
|
||||
if (copy_to_user((void __user *)arg, task, sizeof(*task)))
|
||||
@@ -1138,7 +1138,7 @@ static int snd_compr_task_start_ioctl(struct snd_compr_stream *stream, unsigned
|
||||
return -EPERM;
|
||||
task = memdup_user((void __user *)arg, sizeof(*task));
|
||||
if (IS_ERR(task))
|
||||
return PTR_ERR(no_free_ptr(task));
|
||||
return PTR_ERR(task);
|
||||
retval = snd_compr_task_start(stream, task);
|
||||
if (retval >= 0)
|
||||
if (copy_to_user((void __user *)arg, task, sizeof(*task)))
|
||||
@@ -1229,7 +1229,7 @@ static int snd_compr_task_status_ioctl(struct snd_compr_stream *stream, unsigned
|
||||
return -EPERM;
|
||||
status = memdup_user((void __user *)arg, sizeof(*status));
|
||||
if (IS_ERR(status))
|
||||
return PTR_ERR(no_free_ptr(status));
|
||||
return PTR_ERR(status);
|
||||
retval = snd_compr_task_status(stream, status);
|
||||
if (retval >= 0)
|
||||
if (copy_to_user((void __user *)arg, status, sizeof(*status)))
|
||||
|
||||
Reference in New Issue
Block a user