ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all

[ Upstream commit 03a8b0df75 ]

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: c11117b634 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Wan Jiabing 2022-05-18 10:16:16 +08:00 коммит произвёл Sasha Levin
Родитель fd63fb84ed
Коммит a6f53df52b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1720,7 +1720,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);
}
/*