All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all
@ 2022-05-18  2:16 Wan Jiabing
  2022-05-18  5:00   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Wan Jiabing @ 2022-05-18  2:16 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Wan Jiabing, gushengxian,
	alsa-devel, linux-kernel

Fix following coccicheck error:
./sound/usb/endpoint.c:1671:8-10: ERROR: reference preceded by free on line 1671.

Here should be 'cp' rather than 'ip'.

Fixes: c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 sound/usb/endpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index df5a70013a85..f9c921683948 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1668,7 +1668,7 @@ void snd_usb_endpoint_free_all(struct snd_usb_audio *chip)
 		kfree(ip);
 
 	list_for_each_entry_safe(cp, cn, &chip->clock_ref_list, list)
-		kfree(ip);
+		kfree(cp);
 }
 
 /*
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-18  5:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-18  2:16 [PATCH] ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all Wan Jiabing
2022-05-18  5:00 ` Takashi Iwai
2022-05-18  5:00   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.