Commit 2e5a8e15 authored by Xu Wang's avatar Xu Wang Committed by Takashi Iwai
Browse files

ALSA: usb-audio: endpoint : remove needless check before usb_free_coherent()



usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: default avatarXu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20200727025208.8739-1-vulab@iscas.ac.cn

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9ab0cb30
......@@ -615,9 +615,8 @@ static void release_urbs(struct snd_usb_endpoint *ep, int force)
for (i = 0; i < ep->nurbs; i++)
release_urb_ctx(&ep->urb[i]);
if (ep->syncbuf)
usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
ep->syncbuf, ep->sync_dma);
usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
ep->syncbuf, ep->sync_dma);
ep->syncbuf = NULL;
ep->nurbs = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment