aboutsummaryrefslogtreecommitdiff
path: root/sound/core/control.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-09-02 09:52:27 +0200
committerTakashi Iwai <tiwai@suse.de>2024-09-02 10:21:41 +0200
commit40a024b81d1cbad6bc8cd960481f025b43712b01 (patch)
treec290a20c6f549f22cd93e6c9004d2bcd12a74746 /sound/core/control.c
parentf48bd50a1c8d7d733b83a8fbabb3041e0d505fc7 (diff)
downloadlinux-40a024b81d1cbad6bc8cd960481f025b43712b01.tar.gz
linux-40a024b81d1cbad6bc8cd960481f025b43712b01.tar.bz2
linux-40a024b81d1cbad6bc8cd960481f025b43712b01.zip
ALSA: core: Drop superfluous no_free_ptr() for memdup_user() errors
We used to wrap with no_free_ptr() for the return value from memdup_user() with errors where the auto cleanup is applied. This was a workaround because the initial implementation of kfree auto-cleanup checked only NULL pointers. Since recently, though, the kfree auto-cleanup checks with IS_ERR_OR_NULL() (by the commit cd7eb8f83fcf ("mm/slab: make __free(kfree) accept error pointers")), hence those workarounds became superfluous. Let's drop them now. Link: https://patch.msgid.link/20240902075246.3743-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 7d7d592a8428..4f55f64c42e1 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1249,7 +1249,7 @@ static int snd_ctl_elem_read_user(struct snd_card *card,
control = memdup_user(_control, sizeof(*control));
if (IS_ERR(control))
- return PTR_ERR(no_free_ptr(control));
+ return PTR_ERR(control);
result = snd_power_ref_and_wait(card);
if (result)
@@ -1326,7 +1326,7 @@ static int snd_ctl_elem_write_user(struct snd_ctl_file *file,
control = memdup_user(_control, sizeof(*control));
if (IS_ERR(control))
- return PTR_ERR(no_free_ptr(control));
+ return PTR_ERR(control);
card = file->card;
result = snd_power_ref_and_wait(card);