aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorWan Jiabing <wanjiabing@vivo.com>2022-05-18 10:16:16 +0800
committerTakashi Iwai <tiwai@suse.de>2022-05-18 06:59:48 +0200
commit03a8b0df757f1beb21ba1626e23ca7412e48b525 (patch)
treece05835836b22b458cb00ea4e146b3361ce6e1d3 /sound/usb/endpoint.c
parentALSA: seq: replace ternary operator with max() (diff)
downloadlinux-dev-03a8b0df757f1beb21ba1626e23ca7412e48b525.tar.xz
linux-dev-03a8b0df757f1beb21ba1626e23ca7412e48b525.zip
ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all
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> Link: https://lore.kernel.org/r/20220518021617.10114-1-wanjiabing@vivo.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/*