From 40a024b81d1cbad6bc8cd960481f025b43712b01 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 2 Sep 2024 09:52:27 +0200 Subject: 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 --- sound/core/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/core/timer.c') diff --git a/sound/core/timer.c b/sound/core/timer.c index 4315d1e98ebf..668c40bac318 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1615,7 +1615,7 @@ static int snd_timer_user_ginfo(struct file *file, ginfo = memdup_user(_ginfo, sizeof(*ginfo)); if (IS_ERR(ginfo)) - return PTR_ERR(no_free_ptr(ginfo)); + return PTR_ERR(ginfo); tid = ginfo->tid; memset(ginfo, 0, sizeof(*ginfo)); @@ -2190,7 +2190,7 @@ static int snd_utimer_ioctl_create(struct file *file, utimer_info = memdup_user(_utimer_info, sizeof(*utimer_info)); if (IS_ERR(utimer_info)) - return PTR_ERR(no_free_ptr(utimer_info)); + return PTR_ERR(utimer_info); err = snd_utimer_create(utimer_info, &utimer); if (err < 0) -- cgit v1.2.3